Opened 9 years ago
Last modified 9 years ago
#16659 confirmed Bug
<embed> tag should not have a closing tag
| Reported by: | Lyuba | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | General | Version: | |
| Keywords: | Cc: |
Description
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed states: "Must have a start tag, and must not have an end tag." However, CKEditor is adding a closing tag.
Steps to reproduce
- Go to http://ckeditor.com/demo#full
- Switch to source mode
- Replace source with
<embed src="movie.mov"> - Switch to WYSIWYG mode and back to source mode
- See the tag was closed as
<embed src="movie.mov"></embed>
Expected result
The tag should remain as pasted, without a closing tag
Actual result
A closing </embed> tag is being incorrectly added
Other details (browser, OS, CKEditor version, installed plugins)
Tested on Chrome, latest version

This is weird because
embedis mentioned in empty tags list insidedtd-$empty: { area: 1, base: 1, basefont: 1, br: 1, col: 1, command: 1, dialog: 1, embed: 1, hr: 1, img: 1, input: 1, isindex: 1, keygen: 1, link: 1, meta: 1, param: 1, source: 1, track: 1, wbr: 1 },Specification also says that end tag should be omitted - https://html.spec.whatwg.org/multipage/embedded-content.html#the-embed-element
I can see that closing embed tag has been added since version 4.0.