8.3.x common.inc check_url($uri)
8.0.x common.inc check_url($uri)
8.1.x common.inc check_url($uri)
8.2.x common.inc check_url($uri)
8.4.x common.inc check_url($uri)
4.6.x common.inc check_url($uri)
4.7.x common.inc check_url($uri)
5.x common.inc check_url($uri)
6.x common.inc check_url($uri)
7.x common.inc check_url($uri)

Prepare a URL for use in an HTML attribute. Strips harmful protocols.

27 calls to check_url()
aggregator_refresh in modules/aggregator/aggregator.module
Checks a news feed for new items.
blog_form in modules/blog/blog.module
Implementation of hook_form().
chameleon_page in themes/chameleon/chameleon.theme
format_rss_channel in includes/common.inc
Formats an RSS channel.
format_rss_item in includes/common.inc
Format a single RSS item.

... See full list

File

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

Code

function check_url($uri) {
  return filter_xss_bad_protocol($uri, FALSE);
}

Comments

c0psrul3’s picture

proposed return line:

...
return str_replace("//","/", filter_xss_bad_protocol($uri, FALSE));