Function __global->cms_rawurlencode

Definitions

sources/urls.php

  • Encode a URL component, as per cms_urlencode but without slashes and common ModSecurity blocks being encoded.Only used if URL monikers are enabled.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$url_part URLPATH No No required parameter N/A N/A The URL to encode
$can_try_url_schemes ?boolean No No Null N/A N/A Whether we have to consider URL Schemes (null: don't know, look up)

Returns

  • The encoded result
  • Type: URLPATH
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Encode a URL component, as per cms_urlencode but without slashes and common ModSecurity blocks being encoded.Only used if URL monikers are enabled.
 *
 * @param  URLPATH $url_part The URL to encode
 * @param  ?boolean $can_try_url_schemes Whether we have to consider URL Schemes (null: don't know, look up)
 * @return URLPATH The encoded result
 */

function cms_rawurlencode(string $url_part, ?bool $can_try_url_schemes = null) : string