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)

x86
Windows 2000
defect
Not set
normal

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&reg.id=1" gets translated as if the &reg 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.
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.
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?)
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
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&reg.id=1
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Semicolon is optional according to SGML parsing rules.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → INVALID
Ugh, sorry I missed Anne'a comment... thanks for clearing up!
*** 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.