You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
214
+
* @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0.
215
215
* Use UrlHelper::stripDangerousProtocols() or UrlHelper::filterBadProtocol()
216
216
* instead. UrlHelper::stripDangerousProtocols() can be used in conjunction
217
217
* with \Drupal\Component\Render\FormattableMarkup and an @variable
@@ -225,6 +225,7 @@ function valid_email_address($mail) {
225
225
* @see https://www.drupal.org/node/2560027
226
226
*/
227
227
functioncheck_url($uri) {
228
+
@trigger_error(__FUNCTION__ . '() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use UrlHelper::stripDangerousProtocols() or UrlHelper::filterBadProtocol() instead. See https://www.drupal.org/node/2560027', E_USER_DEPRECATED);
$this->assertIdentical(check_url($url), $expected_html, 'check_url() filters a URL and encodes it for HTML.');
52
51
$this->assertIdentical(UrlHelper::filterBadProtocol($url), $expected_html, '\Drupal\Component\Utility\UrlHelper::filterBadProtocol() filters a URL and encodes it for HTML.');
53
52
$this->assertIdentical(UrlHelper::stripDangerousProtocols($url), $expected_plain, '\Drupal\Component\Utility\UrlHelper::stripDangerousProtocols() filters a URL and returns plain text.');
54
53
55
54
}
56
55
56
+
/**
57
+
* Tests deprecation of the check_url() function.
58
+
*
59
+
* @group legacy
60
+
* @expectedDeprecation check_url() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use UrlHelper::stripDangerousProtocols() or UrlHelper::filterBadProtocol() instead. See https://www.drupal.org/node/2560027
0 commit comments