Closed
Bug 69043
Opened 24 years ago
Closed 24 years ago
javascript: href mangled when character reference is used
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
mozilla1.0
People
(Reporter: markus.kuehni, Assigned: jst)
Details
(Keywords: dom0)
Attachments
(1 file)
1009 bytes,
text/html
|
Details |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; 0.8) Gecko/20010215
BuildID: 2001011508
A javascript: href containing an HTML character reference (numeric encoding
using the &#ddd; form) is re-encoded using the URI %xx form. This breaks the
JavaScript code.
Reproducible: Always
Steps to Reproduce:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Testcase javascript: href problem</title>
</head>
<body>
<h1>Testcase <code>javascript:</code> href problem</h1>
<p>
Shows how Mozilla 0.8 is confused by character references in
<code>javascript:</code> hrefs.
It seems to find it necessary to re-encode the href value using the %xx
notation.
While this is probably the right thing to do for ordinary URIs it obviously
breaks JavaScript:
</p>
<ol>
<li>Please open the JavaScript console (<var>Tasks/Tools/JavaScript
Console</var>)</li>
<li><a href="javascript:alert('·Hello World·')">Test it!</a>
(should display an alert box showing <code>·Hello
World·</code>)</li>
</ol>
<p>
The code works fine on IE 5.5 and Opera 5.02.
</p>
</body>
</html>
Reporter | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
Confirmed under 2001021606/Linux as well.
Comment 3•24 years ago
|
||
Confirming and setting OS all.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Comment 4•24 years ago
|
||
updating component.
Assignee: asa → jst
Component: Browser-General → DOM Level 0
QA Contact: doronr → desale
Comment 5•24 years ago
|
||
I think this might not be a bug, ccing hixie.
Assignee | ||
Comment 6•24 years ago
|
||
Yet one more problem with escaping/unescaping javascript: URL's. Trying for
mozilla1.0
Hardware: PC → All
Target Milestone: --- → mozilla1.0
Comment 8•24 years ago
|
||
*** This bug has been marked as a duplicate of 51355 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•