Html – Question mark in the middle of a URL variable

htmlurlvariables

If I have a variable to pass through a URL and it has a question mark in it, do I just need to escape the question mark?

If not, how can I make sure it passes through like it's supposed to?

Best Answer

A question mark URL encodes as %3F. But you should use a proper encoder for the whole thing rather than manually encoding a character.