Closed Bug 68167 Opened 24 years ago Closed 23 years ago

Editor escapes ' in "onmouseover" attribute (messes up javascript)

Categories

(Core :: DOM: Editor, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9.4

People

(Reporter: tapio.markula, Assigned: Brade)

References

Details

(Keywords: dataloss, Whiteboard: [html])

Attachments

(4 files, 1 obsolete file)

The editor destroys onmouseover values, because it converts ' to ' 
for example: onmouseover=
"if(browser) nayta(4, 'c');
to
onmouseover=
"if(browser) nayta(4, 'c');
assigning to brade -- another escape issue
Assignee: beppe → brade
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Status: NEW → ASSIGNED
Keywords: dataloss
milestone
Target Milestone: --- → mozilla0.9.1
Summary: Editor and javascript → Editor escapes ' in "onmouseover" attribute (messes up javascript)
are any of bug 75543, bug 60619, bug 75671 related?
*** Bug 76406 has been marked as a duplicate of this bug. ***
Additional information:

converts ' to ' in the below example too:

desired: <a
href="javascript:openWindow('ftp://ftp.netscape.com/pub/netscape6/english/6.01/');">

actual: <a
href="javascript:openWindow(&apos;ftp://ftp.netscape.com/pub/netscape6/english/6.01/&apos;);">

Target Milestone: mozilla0.9.1 → mozilla0.9.2
Keywords: correctness
Priority: P3 → P2
Whiteboard: [html]
Attached patch initial patchSplinter Review
Attached file testcase (obsolete) —
Attached patch patch (take 2)Splinter Review
Other event names to include:

onerror
onabort
onresize
onscroll
onpaint

I've found these in other lists of intrinsic events we do support (or possibly
will in the very near future).

I'm presuming that the changes to the list of elements in
LineBreakAfterOpen/LineBreakBeforeClose/LineBreakAfterClose are unrelated to
this bug. Did you really want to add SELECT to LinkBreakBeforeClose, but not to
LineBreakAfterOpen? Isn't that asymmetrical?
r/sr=vidur with the changes mentioned.
r=kin@netscape.com with vidur's changes.

One small nit-pick, though not required ... the doTreatAttributeAsCDATA variable 
name bugs me, especially since it's used with a ! in front of it ... is there a 
better name?
Whiteboard: [html] → [html] fixed, reviewed, need a=
a= asa@mozilla.org for checkin to the trunk.
(on behalf of drivers)
Blocks: 83989
Whiteboard: [html] fixed, reviewed, need a= → [html] fixed, reviewed, approved
This bug is partially fixed (all JS attributes won't be escaped).
The remaining issue is dealing with href (and other?) attributes which might have 
javascript: urls.

Pushing off to mozilla0.9.3 while that issue is being resolved.
Target Milestone: mozilla0.9.2 → mozilla0.9.3
OS: other → All
Hardware: Other → All
Whiteboard: [html] fixed, reviewed, approved → [html]
javascript is used extensively in web pages

reviewed and approved
Keywords: nsBranch
1.0
Keywords: nsBranch
Target Milestone: mozilla0.9.3 → mozilla1.0
Depends on: 92271
Target Milestone: mozilla1.0 → mozilla0.9.4
No longer depends on: 92271
Blocks: 92271
r=nhotta
this fix was checked into the trunk before the builds today.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
*** Bug 96554 has been marked as a duplicate of this bug. ***
Verified on 8-27 build
Status: RESOLVED → VERIFIED
Attachment #38617 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: