function check_url

cis7 common.inc check_url($uri)
cle7 common.inc check_url($uri)
elmsmedia7 common.inc check_url($uri)
icor7 common.inc check_url($uri)
meedjum_blog7 common.inc check_url($uri)
mooc7 common.inc check_url($uri)

Strips dangerous protocols from a URI and encodes it for output to HTML.

Parameters

$uri: A plain-text URI that might contain dangerous protocols.

Return value

A URI stripped of dangerous protocols and encoded for output to an HTML attribute value. Because it is already encoded, it should not be set as a value within a $attributes array passed to drupal_attributes(), because drupal_attributes() expects those values to be plain-text strings. To pass a filtered URI to drupal_attributes(), call drupal_strip_dangerous_protocols() instead.

See also

drupal_strip_dangerous_protocols()

Related topics

27 calls to check_url()
adaptivetheme_preprocess_page in sites/all/themes/ulmus/adaptivetheme/at_core/inc/preprocess.inc
Preprocess variables for page.tpl.php
bakery_form_alter in sites/all/modules/ulmus/bakery/bakery.module
Implements hook_form_alter().
comment_tokens in modules/comment/comment.tokens.inc
Implements hook_tokens().
data_ui_join_form in sites/all/modules/local_contrib/data/data_ui/data_ui.admin.inc
Join form.
feeds_views_handler_field_source::render in sites/all/modules/ulmus/feeds/views/feeds_views_handler_field_source.inc
Override parent::render().

... See full list

File

includes/common.inc, line 1387
Common functions that many Drupal modules will need to reference.

Code

function check_url($uri) {
  return check_plain(drupal_strip_dangerous_protocols($uri));
}