diff --git a/core/includes/common.inc b/core/includes/common.inc index 197db87..96e6bd3 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -911,7 +911,7 @@ function valid_number_step($value, $step, $offset = 0.0) { * check_plain() being called on it. However, it can be passed to functions * expecting plain-text strings. * - * @see check_url() + * @see \Drupal\Component\Utility\Url::stripDangerousProtocols() */ function drupal_strip_dangerous_protocols($uri) { return Url::stripDangerousProtocols($uri); @@ -932,7 +932,8 @@ function drupal_strip_dangerous_protocols($uri) { * Drupal\Core\Template\Attribute, call drupal_strip_dangerous_protocols() * instead. * - * @see \Drupal\Component\Utility\String::stripDangerousProtocols() + * @see \Drupal\Component\Utility\Url::stripDangerousProtocols() + * @see \Drupal\Component\Utility\String::checkPlain() */ function check_url($uri) { return String::checkPlain(Url::stripDangerousProtocols($uri)); @@ -983,7 +984,6 @@ function filter_xss_admin($string) { * An XSS safe version of $string, or an empty string if $string is not * valid UTF-8. * - * @see drupal_validate_utf8() * @see \Drupal\Component\Utility\String::filterXss() * * @ingroup sanitization @@ -995,16 +995,16 @@ function filter_xss($string, $allowed_tags = array('a', 'em', 'strong', 'cite', /** * Processes an HTML attribute value and strips dangerous protocols from URLs. * - * @param $string + * @param string $string * The string with the attribute value. * - * @return + * @return string * Cleaned up and HTML-escaped version of $string. * - * @see \Drupal\Component\Utility\String::filterBadProtocol() + * @see \Drupal\Component\Utility\Url::filterBadProtocol() */ function filter_xss_bad_protocol($string) { - return String::filterBadProtocol($string); + return Url::filterBadProtocol($string); } /** diff --git a/core/lib/Drupal/Component/Utility/String.php b/core/lib/Drupal/Component/Utility/String.php index 26e74f9..0feedf8 100644 --- a/core/lib/Drupal/Component/Utility/String.php +++ b/core/lib/Drupal/Component/Utility/String.php @@ -217,7 +217,7 @@ public static function filterXss($string, $allowed_tags = array('a', 'em', 'stro /** * Processes an HTML tag. * - * @param array $m + * @param array $matches * An array with various meaning depending on the value of $store. * If $store is TRUE then the array contains the allowed tags. * If $store is FALSE then the array has one element, the HTML tag to process. @@ -228,15 +228,15 @@ public static function filterXss($string, $allowed_tags = array('a', 'em', 'stro * If the element isn't allowed, an empty string. Otherwise, the cleaned up * version of the HTML element. */ - protected static function xssSplit($m, $store = FALSE) { + protected static function xssSplit($matches, $store = FALSE) { static $allowed_html; if ($store) { - $allowed_html = array_flip($m); + $allowed_html = array_flip($matches); return; } - $string = $m[1]; + $string = $matches[1]; if (substr($string, 0, 1) != '<') { // We matched a lone ">" character. diff --git a/core/lib/Drupal/Component/Utility/Url.php b/core/lib/Drupal/Component/Utility/Url.php index 33dc597..f0f7dc0 100644 --- a/core/lib/Drupal/Component/Utility/Url.php +++ b/core/lib/Drupal/Component/Utility/Url.php @@ -8,7 +8,7 @@ namespace Drupal\Component\Utility; /** - * Helper to class to support filtering bad protocols from an url. + * Helper class to support filtering bad protocols from an url. */ class Url {