Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#14415 closed Bug (invalid)

<summary> not handled correctly — incorrect DTD?

Reported by: Wim Leers Owned by:
Priority: Normal Milestone:
Component: General Version: 4.5.5
Keywords: Cc: wim.leers@…

Description (last modified by Wim Leers)

Steps to reproduce

Originally reported at https://www.drupal.org/node/2656566.

  1. Disable ACF.
  2. Enter source mode and paste
    <details>
    	<summary>
    		<div>summary</div>
    	</summary>
    	<div>content</div>
    </details>
    
  3. Exit source mode.
  4. Enter source mode again.

Expected result

Markup is identical to the pasted markup.

Actual result

<details><summary></summary>

<div>summary</div>

<div>content</div>
</details>

Note how <summary> is empty.

Suspected cause: <summary> incorrectly defined in CKEditor's DTD?

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

Drupal 8 (8.0.3 or 8.1.x). Go to /node/add/article, choose the "Full HTML" text format (to disable ACF) and then apply the STR above.

Change History (4)

comment:1 Changed 9 years ago by Wim Leers

Keywords: Drupal added

comment:2 Changed 9 years ago by Wim Leers

Description: modified (diff)

comment:3 Changed 9 years ago by Jakub Ś

Keywords: Drupal removed
Resolution: invalid
Status: newclosed

According to spec: https://www.w3.org/TR/html-markup/summary.html#summary or https://html.spec.whatwg.org/multipage/forms.html#the-summary-element, the summary element may only contain Phrasing Content or Phrasing and Heading Conent.

Div is part of the Flow content so the editor behaviour is correct in this case. Disallowed content is removed from the tag.

comment:4 Changed 9 years ago by Wim Leers

Oh, great!

Thank you, and apologies for the invalid bug report.

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