src/Drupal/Component/Utility/UrlHelper.php
public static function filterBadProtocol($string) {
    // Get the plain text representation of the attribute value (i.e. its
    // meaning).
    $string = Html::decodeEntities($string);
    return Html::escape(static::stripDangerousProtocols($string));
  }
public static function filterBadProtocol($string) {
    // Get the plain text representation of the attribute value (i.e. its
    // meaning).
    $string = Html::decodeEntities($string);
    return Html::escape(static::stripDangerousProtocols($string));
  }
public static function filterBadProtocol ( $ string ) { // Get the plain text representation of the attribute value (i.e. its // meaning). $ string = Html :: decodeEntities ( $ string ) ; return Html :: escape ( static :: stripDangerousProtocols ( $ string ) ) ; }
Processes an HTML attribute value and strips dangerous protocols from URLs.

@param string $string
The string with the attribute value.

@return string
Cleaned up and HTML-escaped version of $string.
Processes an HTML attribute value and strips dangerous protocols from URLs .