Opened 4 years ago

Closed 3 years ago

#14240 closed Bug (expired)

Track not respecting void element flag.

Reported by: sylus Owned by:
Priority: Normal Milestone:
Component: General Version: 4.5.4
Keywords: Cc:

Description

Steps to reproduce

  1. In CKEditor paste:

<track label="English subtitles" kind="subtitles" srclang="en" src="video-subtitles-en.vtt" default>

  1. Toggle the source button on / off

  1. The rendered result is:

<track default="" kind="subtitles" label="English subtitles" src="video-subtitles-en.vtt" srclang="en"></track>

note: ACF should be disabled this is likely why the whole Track tag is stripped in nightly demo as tried to reproduce there.

Expected result

The expected result is that track should respect the fact it is a void element.

Running 'CKEDITOR.dtd.$empty' in the console does show Track is flagged as 1.

Actual result

An extra closing track tag is added.

Other details (browser, OS, CKEditor version, installed plugins)

All CKEditor versions 4.3.5+, MacOSX, Chrome 47, and no plugins

As an aside thank you for all the amazing work done in CKEditor it works superbly otherwise

Change History (2)

comment:1 Changed 4 years ago by Jakub Ś

Status: newpending

Could you provide your build-config.js file? I have treid reproducingthis issue in full package and it has worked as expected. Pasting

<track label="English subtitles" kind="subtitles" srclang="en" src="video-subtitles-en.vtt" default>

resulted in

<track default="" kind="subtitles" label="English subtitles" src="video-subtitles-en.vtt" srclang="en" />

in CKEditor 4.5.6

NOTE: Instead of disabling ACF, you can configure it:

var editor = CKEDITOR.replace( 'editor1', {
	extraAllowedContent: 'track[*]{*}(*)'
});

comment:2 Changed 3 years ago by Jakub Ś

Resolution: expired
Status: pendingclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy