Opened 10 years ago
Closed 10 years ago
#12820 closed Bug (invalid)
Empty elements not processed correctly when elements closed in the opening tag.
Reported by: | Franck Valentin | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
If I add in a document the following content (in the source mode):
<mytag id="1"></mytag> <mytag id="2"></mytag> <mytag id="3"></mytag>
then everything works correctly when displaying it and going back to the source mode. But when I enter the following content:
<mytag id="1"/> <mytag id="2"/> <mytag id="3"/>
then when displaying it and going back to the source mode I get
<mytag id="1"> <mytag id="2"> <mytag id="3"></mytag></mytag></mytag>
These tags are now embedded!
Here is a jsfiddle: http://jsfiddle.net/franckv/243fqtdr/
You need to change the DTD (including http://docs.ckeditor.com/#!/api/CKEDITOR.dtd-property-S-empty to solve this issue) if you want to load custom tags. Remember that CKEditor is an HTML editor, not XML editor, so it's not guaranteed that every kind of markup will work.