Problem/Motivation
Basically, if you're using CKEditor with styles dropdown and "limit allowed HTML tags", automatic "allowed tags" updating can really trip you up.
Steps to reproduce:
- Add a new text format
- Configure it to use CKEditor
- Add "Styles" button to your "Active Toolbar"
- Add a "Styles dropdown" entry, like
p.test|Test
- Enable "Limit allowed HTML tags and correct faulty HTML"
- Under "Allowed HTML tags" enter in
<p class>
- The significance of "class" with no set value is it allows all values
- Save the configuration
- Edit the configuration again
- You see this message:
Based on the text editor configuration, these tags have automatically been added:
<p class=" test">
. - The "Allowed HTML tags" now has
<p class=" test">
This is unnecessary because <p class>
allowed for class='test'
, but is worse because now only the test class is allowed. Of course, you can change this before you save, but you'll have to do it every time you edit the configuration.