Closed
Bug 63314
Opened 25 years ago
Closed 25 years ago
Javascript URL with non-ascii character becomes garbled.
Categories
(Core :: Networking, defect)
Tracking
()
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).
Comment 1•25 years ago
|
||
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
Comment 2•25 years ago
|
||
Comment 4•25 years ago
|
||
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"
Comment 5•25 years ago
|
||
*** This bug has been marked as a duplicate of 51355 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•