I have url with parameters in my static web page
the problem is that the second and the third equals signs are changed into =, when I click on the URL. Is there a possibility to say to the browser not to change equals? And why the first equal works fine?
I have found some answers about nginx, but this is just static site not connected to nginx settings. Thank you
EDIT: Problem was caused with saving the page to the local storage. During the save the & signs are being changed by firefox into ; signs
CodePudding user response:
the problem is that the second and the third equals signs are changed into =, when I click on the URL.
This is normal. It should not be a problem if you are reading the URL with something that supports the standards.
And why the first equal works fine?
The standard format of a query string is a series of key=value
pairs which are separated by &
characters.
Older versions of the standard supported ;
as well as &
, but they are obsolete.
=
signs, being the symbol that indicates the end of a key and start of a value, should be encoded as =
when they occur inside a key or a value.
The first equal in your example is the symbol that separates the key from the value. The second is data inside the value.
Is there a possibility to say to the browser not to change equals?
Change your URL so you use &
as the separator instead of ;
.