Skip to content

Experiment: modify KSES filter to allow Font Awesome svg html under lower-privileged conditions#273

Open
mlwilkerson wants to merge 9 commits intomainfrom
modify-kses-filter
Open

Experiment: modify KSES filter to allow Font Awesome svg html under lower-privileged conditions#273
mlwilkerson wants to merge 9 commits intomainfrom
modify-kses-filter

Conversation

@mlwilkerson
Copy link
Member

@mlwilkerson mlwilkerson commented Oct 9, 2025

This PR is an alternative to #272.

Where #272 uses server-side dynamic block block render to avoid storing raw HTML in posts, this one adjusts the KSES filter to allow Font Awesome <svg> HTML to be written into post_content.

Advantages

  1. Remains continuous with existing functionality: where raw <svg> HTML is stored in posts, and no server-side rendering is required for front end page loads
  2. Works for both icon blocks and rich text icons. Whereas, Experiment: use dynamic block server-side rendering #272 only works for icon blocks.
  3. It's a smaller overall change than Experiment: use dynamic block server-side rendering #272

Disadvantages

  1. It requires changing global KSES filters which impacts all HTML sanitization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant