Skip to content

what is correct approach to manipulate/work with URL parameters? #5018

Answered by Deltik
Jimmi08 asked this question in Q&A Core
Discussion options

You must be logged in to vote

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 into id.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…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Jimmi08
Comment options

@Deltik
Comment options

@Jimmi08
Comment options

@Deltik
Comment options

@Jimmi08
Comment options

Answer selected by Jimmi08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants