Opened 8 years ago

Last modified 8 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

  1. Go to http://ckeditor.com/demo#full
  2. Switch to source mode
  3. Replace source with <embed src="movie.mov">
  4. Switch to WYSIWYG mode and back to source mode
  5. 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

Change History (1)

comment:1 Changed 8 years ago by Jakub Ś

Status: newconfirmed

This is weird because embed is mentioned in empty tags list inside dtd -

$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.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy