Closed
Bug 222193
Opened 22 years ago
Closed 22 years ago
links with variables named similar to HTML entities translated into entities, causing link to be invalid when clicked
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: mozilla.org, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030925
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030925
I have an application that generates URLs with variables named similar to HTML
entities, namely the ® entity. Mozilla seems to translate them into
entities, which causes the links to go to the wrong URL. For example,
"?foo=bar®.id=1" gets translated as if the ® were "®" and the URL
becomes "?foo=bar%AE.id=1".
See http://msqr.us/reg-link.html for example.
Reproducible: Always
Steps to Reproduce:
1. Go to http://msqr.us/reg-link.html for example
2.
3.
Expected Results:
URL parameter names should not be translated into HTML entities.
Comment 1•22 years ago
|
||
Not sure about whether or not this is a bug, but I /do/ know you're supposed to
use & when you have an ampersand in a url. The browser then converts that to
the correct url.
Comment 2•22 years ago
|
||
Entities in HTML should be escaped. & becomes &. Your URI would become:
http://no.where/something?one=1&two=2&reg.one=r1&reg.two=r2&amp.foo=bar
(I hope this doesn't get converted, shouldn't there be a preview button within
Bugzilla?)
Comment 3•22 years ago
|
||
Entity conversion must happen in all attribute values. Attribute values that
happen to be URLs are not excluded from this.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 4•22 years ago
|
||
These are *not* entities in the URL. They do not have the final semicolon, and
they are not supposed to be entities. The URL variable "reg.id" is just that, a
variable name, and should not change to "®". Perhaps Mozilla sees the period
and treats that as the closing entity semicolon? Take the example if the
"reg.id" variable was first in the URL, then Mozilla does not translate it:
http://foo.bar/?reg.id=1
But if it is second in the URL, Mozilla will translate it because it follows an
ampersand:
http://foo.bar/?foo=bar®.id=1
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 5•22 years ago
|
||
Semicolon is optional according to SGML parsing rules.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 6•22 years ago
|
||
Ugh, sorry I missed Anne'a comment... thanks for clearing up!
Comment 7•20 years ago
|
||
*** Bug 352811 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•