Closed (works as designed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
ckeditor.module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2016 at 22:39 UTC
Updated:
23 Feb 2016 at 12:13 UTC
Jump to comment: Most recent
Comments
Comment #2
luksakComment #3
wim leersComment #4
wim leersComment #5
wim leersIt's the filter that matters, not .
In other words: the
<details>and<summaryelements are not allowed by the settings you have for your filter.To prove this, I tried entering
<details>test</details>using the text format, and that worked fine.P.S.: also, alarm bells are ringing in my head if the end user is allowed to submit such HTML. I wonder what you're trying to do? :)
Comment #7
luksakSorry, I somehow forgot to reply here. You are right.
I realized that the issue must be something with CKEditor trying to fix having block elements inside the element. Pasting this markup and toggling CKEditor does this:
before:
after:
Comment #8
wim leersThanks, now I was able to reproduce this!
This is indeed a bug in CKEditor. I've reported it upstream: http://dev.ckeditor.com/ticket/14415.
However, I consider this very low priority, because I think less than 1% of sites want to use
<summary>in CKEditor/text fields.Comment #9
wim leersThe CKEditor guys replied:
Therefore this is actually working correctly.
Comment #10
luksakOk, I agree that this is not a use case a lot of sites have and the markup might even be invalid. Still I find it very annoying when WYSIWG editors change markup.
I actually changed my markup to use
<span>instead of<div>inside<summary>to fix this. I also have the entity_embed module installed. I placed an image inside the<summary>tag. The output of this is a<img>tag inside the<summary>which is valid HTML. But CKEditor does the same change to the markup as it does with the<div>.Is there no way to completely disable this behavior?
Comment #11
wim leersCan you again post before vs. after markup examples like you did in #7? That makes reproducing this a hundred times easier :)
Comment #12
luksakOf course, sorry for that. Here is my actual markup.
Before:
After:
Comment #13
wim leersWell, I'm sorry, but I'm afraid the markup you pasted is full of bugs:
<span class="team__summary-wrapper">is not closed<div class="team__summary-image">inside the<summary>, which means it's still violating the spec, and also means #10 is not true (where you said ).<drupal-entity>is not yet registered with CKEditor's DTD, which means CKEditor doesn't know how to treat it correctly. This is a bug in theentity_embedmodule.If I fix the markup and simulate
<drupal-entity>being registered with CKEditor's DTD correctly, then it works:Comment #14
luksakOk, I am sorry for the false bug report. I will fix my markup and see if it works.