-
Hi,
SEF URLs are not used I need to get URL parameters ($_GET), create an array with safe keys and values (probably toDB() or Filter()) should be used) , then manipulate with this array and create a new URL with http_build_query(); So is it there a better example than the above from cpage.php file? And is e_QUERY already safe? so with the example above I don't need to worry about values? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
The purpose of You shouldn't manipulate serialized/escaped data directly, as that is an extra layer of complexity. It should be sufficient to work with If you are trying to put the query string into an HTML page, If you want to store the value in the database, use prepared statements, not |
Beta Was this translation helpful? Give feedback.
The purpose of
e_QUERY
appears to be for legacy uses where the value of the constant is directly put back into rendered HTML. A query string of[debug=everything]id.1&a=b&c[]=1&c[]=2&x="Deltik's Test"
gets turned intoid.1&a=b&c[]=1&c[]=2&x="Deltik's Test"
, which is escaped specifically for HTML, not the browser address bar, though browsers should(?) translate the URL encoding themselves to sensible defaults.You shouldn't manipulate serialized/escaped data directly, as that is an extra layer of complexity. It should be sufficient to work with
$_GET
and copy the keys you care about.If you are trying to put the query string into an HTML page,
htt…