public static UrlHelper::encodePath($path)
Encodes a Drupal path for use in a URL.
For aesthetic reasons slashes are not escaped.
string $path: The Drupal path to encode.
string The encoded path.
public static function encodePath($path) { return str_replace('%2F', '/', rawurlencode($path)); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Component!Utility!UrlHelper.php/function/UrlHelper::encodePath/8.1.x