Closed Bug 63314 Opened 25 years ago Closed 25 years ago

Javascript URL with non-ascii character becomes garbled.

Categories

(Core :: Networking, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 51355
Future

People

(Reporter: bratell, Assigned: neeti)

References

()

Details

(Keywords: intl)

The html below doesn't work in Mozilla because the url is quoted. <html><body> <a href="javascript:alert('Hej och hå');">foo</a> </body></html> Mousing over the link shows that it turned into: javascript:alert(%27Hej%20och%20h%E5%27); which isn't legal Javascript. Clicking it makes the javascript engine yell about syntax errors. If I remove the å, I get the normal: javascript:alert('Hej och h'); and the url works fine. In MSIE both url:s are working fine. I don't know the rules for javascript url:s but, even if å has to be quoted into %E5, the rest of the code shouldn't be touched. Real world example: Open the URL http://web.bratell.nu/andreas/pictures.asp and try to click on a picture. A new window should open, but instead we get syntax errors from javascript. This was tested on Windows 2000 with a build built today (2000-12-19).
Actually, this should be escaped (it's supposed to be an URI[0]), so I guess it should be unescaped before handing it to the JS engine. I strongly suspect this to be a dupe of an existing bug. [0] http://www.w3.org/TR/html4/struct/links.html#adef-href
Target Milestone: --- → Future
Could be a dupe of one of these bugs: bug 55468 bug 66055 bug 70873
Added intl keyword.
Keywords: intl
This WW3 link may be of interest: http://www.w3.org/TR/html4/appendix/notes.html#non-ascii-chars I believe this bug is a duplicate of bug 51355: "javascript:code" doesn't work in hrefs properly"
*** This bug has been marked as a duplicate of 51355 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
QA Contact: tever → benc
You need to log in before you can comment on or make changes to this bug.