1 common.inc backdrop_encode_path($path)

Encodes a Backdrop path for use in a URL.

For aesthetic reasons slashes are not escaped.

Note that url() takes care of calling this function, so a path passed to that function should not be encoded in advance.


string $path: The Backdrop path to encode.

Return value

string: The encoded path.

Related topics


core/includes/common.inc, line 772
Common functions that many Backdrop modules will need to reference.


function backdrop_encode_path($path) {
  return str_replace('%2F', '/', rawurlencode((string) $path));