Strips dangerous protocols from a URI and encodes it for output to HTML.
$uri: A plain-text URI that might contain dangerous protocols.
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.
drupal_strip_dangerous_protocols()
function check_url($uri) {
return check_plain(drupal_strip_dangerous_protocols($uri));
}