Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294883

Broken "Allowed Tags" updating: after all values for an attribute are allowed, it should not be overridden to allow only certain attribute values

$
0
0

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:

  1. Add a new text format
  2. Configure it to use CKEditor
  3. Add "Styles" button to your "Active Toolbar"
  4. Add a "Styles dropdown" entry, like p.test|Test
  5. Enable "Limit allowed HTML tags and correct faulty HTML"
  6. Under "Allowed HTML tags" enter in <p class>
    • The significance of "class" with no set value is it allows all values
  7. Save the configuration
  8. Edit the configuration again
  9. You see this message:
    Based on the text editor configuration, these tags have automatically been added: <p class=" test">.
  10. 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.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 294883

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>