Function __global->protect_url_parameter

Definitions

sources/urls.php

  • Convert the format of a URL so it can be embedded as a parameter that ModSecurity and browser-based XSS filtering will not trigger security errors on.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$parameter mixed No No required parameter N/A N/A Non-encoded parameter (Tempcode, string, or null)

Returns

  • Encoded parameter (null: null input pipe-through)
  • Type: ?Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Convert the format of a URL so it can be embedded as a parameter that ModSecurity and browser-based XSS filtering will not trigger security errors on.
 *
 * @param  mixed $parameter Non-encoded parameter (Tempcode, string, or null)
 * @return ?Tempcode Encoded parameter (null: null input pipe-through)
 */

function protect_url_parameter($parameter) : ?object