Unable to Use HTML Purifier

Created on 20 July 2023, 11 months ago
Updated 12 June 2024, 12 days ago

Problem/Motivation

I tried to switch over from using the "Limit allowed HTML tags and correct faulty HTML" to HTML Purifier, but I can't enable it for our "Advanced HTML". When I try to save the text format, i get an error:

The current CKEditor 5 build requires the following elements and attributes:
<br> <p> <h2> <h3> <h4> <strong> <em> <s> <blockquote> <a href class id target="_blank"> <ul> <ol reversed start> <li> <img src alt height width data-entity-type data-entity-uuid>
The following elements are missing:
<br> <p> <h2> <h3> <h4> <strong> <em> <s> <blockquote> <a href class id target="_blank"> <ul> <ol reversed start> <li> <img src alt height width data-entity-type data-entity-uuid>

I've attempted to add my own configuration to this filter, changing the "Allowed:" value from "null" (default) to:
Allowed: br,p,h2,h3,h4,strong,em,s,blockquote,a[href|class|id|target],ul,ol[reversed|start],li,img[src|alt|height|width|data-entity-type|data-entity-uuid] but this doesn't doesn't get rid of the error.

Steps to reproduce

  1. Install D9 using the standard installation profile
  2. Install/Enable the HTML Purifier module
  3. Visit the Basic HTML text format configuration page: /admin/config/content/formats/manage/basic_html
  4. Disable the filter "Limit allowed HTML tags and correct faulty HTML"
  5. Enable the HTML Purifier filter
  6. Save the text format, and see a very similar error as posted above.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ’ฌ Support request
Status

Needs review

Component

User interface

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States safetypin Memphis, Tennessee

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024