public static UrlHelper::encodePath($path)
Encodes a Drupal path for use in a URL.
For aesthetic reasons slashes are not escaped.
Parameters
string $path: The Drupal path to encode.
Return value
string The encoded path.
File
- core/lib/Drupal/Component/Utility/UrlHelper.php, line 193
Class
- UrlHelper
- Helper class URL based methods.
Namespace
Drupal\Component\Utility
Code
public static function encodePath($path) { return str_replace('%2F', '/', rawurlencode($path)); }
Please login to continue.