By dawehner on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
URL related functions like have moved to the UrlHelper component.
Specifically:
drupal_get_query_parameters
drupal_http_build_query
drupal_parse_url
drupal_encode_path
url_is_external
drupal_get_query_array
filter_xss_bad_protocol
D7
drupal_get_query_parameters('foo=bar&bar=baz');
drupal_http_build_query(array('foo' => 'bar', 'bar' => 'bar'));
drupal_parse_url('http://localhost/test?foo=bar&bar=baz');
drupal_encode_path('drupal');
url_is_external('http://drupal.org');
$query_array = drupal_get_query_array('foo=bar&bar=baz');
filter_xss_bad_protocol('javascript://example.com?foo&bar');
D8
use \Drupal\Component\Utility\UrlHelper;
UrlHelper::filterQueryParameters('foo=bar&bar=baz');
UrlHelper::buildQuery(array('foo' => 'bar', 'bar' => 'bar'));
UrlHelper::parse('http://localhost/test?foo=bar&bar=baz');
UrlHelper::encodePath('drupal');
UrlHelper::isExternal('http://drupal.org');
parse_str('foo=bar&bar=baz', $query_array);
UrlHelper::filterBadProtocol('javascript://example.com?foo&bar');
Impacts:
Module developers