Jump to content

Edit History

Appwards

Appwards

Actually Tools::getValue() isn't meant for any type of data in particular.

The docstring reads:

// Get a value from $_POST / $_GET
// if unavailable, take a default value

getValue() is being overly cautious, essential breaking perfectly valid (and properly encoded) url parameters and modifies them.

If you need slashes in your URL parameters just use:

$myVariable = ( isset($_GET['myVar']) ? $_GET['myVar'] : false);

It's a bit more work, but it solves your problem.

Appwards

Appwards

Actually Tools::getValue() isn't meant for any type of data in particular.

The docstring reads:

// Get a value from $_POST / $_GET
// if unavailable, take a default value

getValue() is being overly cautious, essential breaking perfectly valid (and properly encoded) url parameters and modifies them.

If you need slashes in your URLs just use

$myVariable = ( isset($_GET['myVar']) ? $_GET['myVar'] : false);

 

×
×
  • Create New...