How it Works

  1. Create an input filter that only allows the <strong> element using the Limit allowed HTML tags filter.
  2. 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

loominade created an issue. See original summary.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Wim Leers’s picture

Title: CKeditor allowes <p> even if "Limit allowed HTML tags" forbids it » CKEditor allowes <p> even if "Limit allowed HTML tags" forbids it
Category: Bug report » Support request
Status: Active » Closed (duplicate)
Related issues: +#2875863: CKEditor automatically includes <p> wrappers even when text format is configured to not allow <p> tag