Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
How it Works
- Create an input filter that only allows the
<strong>
element using the Limit allowed HTML tags filter. - enter the text
<p><strong>Test</strong></p>
to a textfield that uses this input format.
Result:
<strong>Test</strong>
How it does not work
Now enable the CKeditor text editor on the very same input format. Do not change the Limit allowed HTML tags filter.
Result:
<p><strong>Test</strong></p>
The <p>
is not longer filtered even though its not explicitly allowed.
Comments
Comment #4
Wim LeersSee my answer at #2875863: CKEditor automatically includes <p> wrappers even when text format is configured to not allow <p> tag.