diff --git a/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php b/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php index 8f96f65..a8e82cc 100644 --- a/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php @@ -226,18 +226,18 @@ function providerFormat() { // Change the following expectations if/when that behavior is changed. // For now, protocol filtering is the caller's responsibility. - $tests[] = array('URL: :url', array(':url' => 'javascript:xss()'), 'URL: javascript:xss()', 'SafeMarkup::format replaces URL as-is.', FALSE); + $tests['url-placeholder-with-xss'] = array('URL: :url', array(':url' => 'javascript:xss()'), 'URL: javascript:xss()', 'SafeMarkup::format replaces URL as-is.', FALSE); // Within a URL fragment, '&' and ';' have no special meaning, so '<' // does not refer to a '<'. The last argument being FALSE ensures that if // the resulting string is output to HTML, then the entire string will get // escaped, which will preserve the correct meaning of the URL fragment. - $tests[] = array('URL: :url', array(':url' => 'http://example.com#<'), 'URL: http://example.com#<', 'SafeMarkup::format replaces URL as-is.', FALSE); + $tests['url-placeholder-with-fragment-with-&;'] = array('URL: :url', array(':url' => 'http://example.com#<'), 'URL: http://example.com#<', 'SafeMarkup::format replaces URL as-is.', FALSE); // Same URL as above, but already escaped for HTML by the caller. The last // argument being TRUE ensures that it does not get re-escaped when output // to HTML. - $tests[] = array('URL: :url', array(':url' => SafeMarkupTestSafeString::create('http://example.com#&lt;')), 'URL: http://example.com#&lt;', 'SafeMarkup::format replaces URL as-is.', TRUE); + $tests['url-placeholder-with-fragment-with-&;-escaped-already'] = array('URL: :url', array(':url' => SafeMarkupTestSafeString::create('http://example.com#&lt;')), 'URL: http://example.com#&lt;', 'SafeMarkup::format replaces URL as-is.', TRUE); return $tests; }