Ticket #26 (closed defect: fixed)
Patch for removing nested tags in mozilla
Reported by: | bermi | Owned by: | jf.hovinne |
---|---|---|---|
Priority: | major | Milestone: | 0.3.1 |
Component: | editor | Version: | trunk |
Keywords: | xhtml | Cc: |
Description
This patch came up when trying to fix issue #22.
I found that Mozilla designMode does insert tags even if they are repeated. This leads to situations where generated code looks like this (emphasis can not be removed on wysiwm mode)
<p>Welcome to <em><em>MetaDesign</em>.</em></p>
when it should be just
<p>Welcome to <em>MetaDesign.</em></p>
As you can see it takes the outermost tag.
This might also needed on other browsers and it can be easily moved to jquery.wymeditor.js
Attachments
Change History
comment:2 follow-up: ↓ 3 Changed 5 years ago by Moxide
Works great, but it seems to break the "display HTML" feature. When clicking on "HTML", the following JS error occurs :
e.toggle is not function
It is located in WymClassMozilla.prototype.toggleHtml.
comment:3 in reply to: ↑ 2 Changed 5 years ago by bermi
Replying to Moxide:
Works great, but it seems to break the "display HTML" feature. When clicking on "HTML", the following JS error occurs :
e.toggle is not functionIt is located in WymClassMozilla.prototype.toggleHtml.
I'm using it together with prototype.js so I missed to enclose "e" in "$j()"
changing the line 285 to
$j(e).toggle();
will fix the issue.
comment:5 Changed 5 years ago by bermi
See attachment in #32 for commented nestedCheck implementation.
comment:6 Changed 5 years ago by jf.hovinne
- Milestone changed from 0.3 to 0.3.1
OK, thanks. Will be included in 0.3.1, so we can release 0.3 asap.
comment:7 Changed 5 years ago by bermi
This patch functionality is included in the New Parser in a more elegant way, so this patch is no longer necessary.