Closed
Bug 77043
Opened 23 years ago
Closed 23 years ago
HTML special characters and entities not working in HREFs
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
People
(Reporter: abo, Assigned: harishd)
References
()
Details
Attachments
(2 files)
When a string argument is passed to a javascript function containing HTML special characters or entitities (like "ÄÖÜäöü" or "ÄÖÜäöü") javascript will stop execution and nothing will happen any more. IE can handle such arguments correctly. See the URL given above for an example.
Comment 2•23 years ago
|
||
Special characters are handled just fine by JavaScript. To show this, try: <a href="#" onclick="display_message('ÄÖÜ ִײ� äöü הצ�');"> ...it works correctly. What is happening in the testcase is that the special-character entities are being translated, THEN url-encoded since they are in an href="". For some reason, though, the single-quotes are being dropped and thus the function parameter is not being passed as a string, giving a JS error. This seems to be a url-encoding issue.
What is happening in the testcase is that the special-character entities are being translated, THEN url-encoded since they are in an href="". For some reason, though, the single-quotes are being dropped and thus the function parameter is not being passed as a string, giving a JS error. This seems to be a url-encoding issue.
Comment 4•23 years ago
|
||
Comment 5•23 years ago
|
||
In NN4.7, both anchors in the above testcase behave the same: you get the same alert with foreign characters in each case. In Mozilla/N6, the onClick example works fine, but the HREF example errors in the JavaScript Console and produces no alert. Reassigning to Parser component - this may simply be a duplicate of bug 51355.
Assignee: rogerl → harishd
Status: UNCONFIRMED → NEW
Component: Javascript Engine → Parser
Ever confirmed: true
OS: Windows 2000 → All
QA Contact: pschwartau → bsharma
Summary: JavaScript can't handle HTML special characters and entities → HTML special characters and entities not working in HREFs
*** This bug has been marked as a duplicate of 51355 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•