#6720 closed Bug (fixed)
CKE specific attributes _cke_saved_href and _cke_saved_src not removed from code example if preceded by <abbr> or <acronym>
Reported by: | Martijn Vermeulen | Owned by: | Alfonso Martínez de Lizarrondo |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.4.3 |
Component: | General | Version: | 3.4.2 |
Keywords: | Cc: |
Description
We use CKEditor as the editor in Drupal 6.x for one of our projects. One of the features of the website is showing code examples to visitors. As the website has to comply with the Web Guidelines for the Dutch government (which are based on WCAG1) the use of <abbr> elements is abundant.
This is where a problem arises:
CKEditor adds _cke_saved_href and _cke_saved_src attributes in the code examples if the code sample (which is between <pre> tags) is preceded by <abbr> or <acronym> elements.
I've downloaded CKEditor and reproduced this problem by editing one of the samples to reflect this situation.
In divreplace.html I've created this <div>:
<div class="editable"> <pre><a href="#" onclick="window.open('http://domein.nl/pagina', '_blank');"></pre> <acronym>HTML</acronym> <pre><a href="#" onclick="window.open('http://domein.nl/pagina', '_blank');"></pre> <abbr>HTML</abbr> <pre><a href="#" onclick="window.open('http://domein.nl/pagina', '_blank');"></pre> <pre><a href="#" onclick="window.open('http://domein.nl/pagina', '_blank');"></pre> </div>
This results in the following content of the CKEditor:
<a href="#" onclick="window.open('http://domein.nl/pagina', '_blank');"> HTML <a href="#" _cke_saved_href="#" onclick="window.open('http://domein.nl/pagina', '_blank');"> HTML <a href="#" _cke_saved_href="#" onclick="window.open('http://domein.nl/pagina', '_blank');"> <a href="#" onclick="window.open('http://domein.nl/pagina', '_blank');">
As you can see the first line of example code is OK; no _cke_* attributes are added. The second and third line of example code get "polluted" with _cke_* attributes. The fourth line is ok again (only the first line of example code after a <abbr> or <acronym> element is affected).
The problem is with the href AND the src attributes and occurs in all browsers I've tried (IE8, FF3, Chrome7).
We've temporarely fixed the output to visitors by removing the _cke_* attributes before content is saved to the database, but we would very much like this to be fixed in the CKEditor itself.
Kind regards, Martijn
Attachments (1)
Change History (6)
comment:1 Changed 14 years ago by
Version: | 3.4.3 (SVN - trunk) → 3.4.2 |
---|
Changed 14 years ago by
Attachment: | 6720.patch added |
---|
comment:2 Changed 14 years ago by
Owner: | set to Alfonso Martínez de Lizarrondo |
---|---|
Status: | new → review |
comment:5 Changed 14 years ago by
Milestone: | → CKEditor 3.4.3 |
---|
Proposed patch