Opened 3 years ago

Closed 3 years ago

#13680 closed Bug (fixed)

<summary> should support heading content

Reported by: stephaniehobson Owned by: Szymon Cofalik
Priority: Normal Milestone: CKEditor 4.5.4
Component: General Version: 4.0
Keywords: Cc:

Description

Steps to reproduce

  1. switch to source view
  2. create a <details> element
  3. put a <summary> element inside it
  4. put a <h2> element inside that
  5. switch to preview
  6. switch to source view
  7. <summary> is no longer around <h2>

Expected result

<summary><h2>Summary</h2></summary>

Actual result

<summary></summary><h2>Summary</h2>

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

Heading content is acceptable according to the spec: http://www.w3.org/html/wg/drafts/html/master/semantics.html#the-summary-element

The 'open' attribute is also being stripped off the <details> element but I'm not yet 100% sure that's not a problem with our configuration.

FireFox 41 OSX 10.10.14 CKEditor: 4.4.8 Plugins: a11yhelp: 1, autogrow: 1, basicstyles: 1, bidi: 1, blockquote: 1, clipboard: 1, contextmenu: 1, dialogadvtab: 1, elementspath: 1, enterkey: 1, entities: 1, find: 1, htmlwriter: 1, image: 1, indentlist: 1, language: 1, link: 1, list: 1, liststyle: 1, magicline: 1, maximize: 1, pastefromword: 1, pastetext: 1, removeformat: 1, resize: 1, scayt: 1, sharedspace: 1, showblocks: 1, showborders: 1, sourcearea: 1, stylescombo: 1, tab:1, table: 1, tabletools: 1, toolbar: 1, undo: 1, wsc: 1, wysiwygarea: 1, 'mdn-attachment': 1, 'mdn-format': 1, 'mdn-sticky-toolbar': 1, 'mdn-image-attachment': 1, 'mdn-link-customization': 1, 'mdn-link-launch': 1, 'mdn-redirect': 1, 'mdn-sample-finder': 1, 'mdn-sampler': 1, 'mdn-spell': 1, 'mdn-syntaxhighlighter': 1, 'mdn-system-integration': 1, 'mdn-table-customization': 1, 'mdn-toggle-block': 1, 'mdn-wrapstyle': 1, 'mdn-youtube': 1, descriptionlist: 1, tablesort: 1, texzilla: 1

Change History (9)

comment:1 Changed 3 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.5.4
Status: newconfirmed
Version: 4.4.84.0

I checked the spec (http://www.w3.org/html/wg/drafts/html/master/semantics.html#the-summary-element) and you're right. Perhaps it was updated after we created our DTD.

I guess following workaround should work:

CKEDITOR.dtd.summary.h1 = 1;
CKEDITOR.dtd.summary.h1 = 2; // etc.

comment:2 Changed 3 years ago by Szymon Cofalik

Owner: set to Szymon Cofalik
Status: confirmedassigned

comment:3 Changed 3 years ago by Szymon Cofalik

Fix pushed to branch:t/13680

comment:4 Changed 3 years ago by Szymon Cofalik

Status: assignedreview

comment:5 Changed 3 years ago by Piotrek Koszuliński

Status: reviewreview_failed

Test, please ;>. Simple one in the htmlparser will be enough.

comment:6 Changed 3 years ago by Szymon Cofalik

Why won't you just trust me? :) Test added to branch:t/13680

comment:7 Changed 3 years ago by Piotrek Koszuliński

I believe you. I don't believe the code :P

comment:8 Changed 3 years ago by Szymon Cofalik

Status: review_failedreview

comment:9 Changed 3 years ago by Piotrek Koszuliński

Resolution: fixed
Status: reviewclosed

Fixed on master with git:cb9f37c.

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