#10006 closed Bug (fixed)
Strip entire element after removing required attr/style
Reported by: | Piotrek Koszuliński | Owned by: | Piotrek Koszuliński |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.1 RC |
Component: | General | Version: | |
Keywords: | Drupal | Cc: | wim.leers@… |
Description (last modified by )
E.g. <a name=""></a>
should be removed when name attribute was filtered out.
Similar case: currently <span>
is allowed because plugins like font, colorbutton allow styles which base on span elements. So when pasting e.g. <span lang="pl">
, lang is filtered out, but <span>
left.
Proposed fix:
There should be a way to mark attrs/style/class as required. Element is marked by this rule as valid (element has to be valid, otherwise it will be filtered out) only if it has this required property.
Possible format:
"a[!href]; span{!color}"
PS. Plugins like font and colorbutton use styles to register content they generate, so by default when passing style to filter#allow()
all parts of style should be marked as required.
Change History (12)
comment:1 Changed 12 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:4 Changed 12 years ago by
Summary: | Strip entire inline element after removing required attr/style → Strip entire element after removing required attr/style |
---|
comment:5 Changed 12 years ago by
Owner: | set to Piotrek Koszuliński |
---|---|
Status: | confirmed → assigned |
comment:6 Changed 12 years ago by
Status: | assigned → review |
---|
comment:8 Changed 12 years ago by
Status: | review → review_passed |
---|
comment:9 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Merged to major on git:3a9b2c5 on dev and 33387db on tests.
comment:11 Changed 12 years ago by
In fact !important means 'not important' :D. But I'm glad that you liked our syntax :).
comment:12 Changed 12 years ago by
That's a good point :)
But fact is of course that that is not what the CSS syntax is trying to convey :)
So, let me restate: from a "typical programming language POV" it makes no sense, but it's analogous to the CSS syntax, so it does makes sense in this context!
It doesn't make sense to restrict this to inline content only. I can't see any case in which block element without some property should be removed, but theoretically <a> as HTML5's transparent element may become a block one.