amnestywebsite / humanity-theme

The Amnesty International WordPress Humanity Theme
https://wordpresstheme.amnesty.org/
Other
38 stars 11 forks source link

Fix old header rendering #420

Closed jaymcp closed 1 month ago

jaymcp commented 1 month ago

Style tag was being escaped, leaving the CSS to be output as a string. This fix allows the style tag to be output without being stripped by KSES only whilst the header block is being rendered. Since the CSS being rendered is properly escaped in the renderer, this should be acceptable.

Ref: https://github.com/amnestywebsite/humanity-theme/issues/246

Steps to test:

  1. Visit a page that's using the old header block, or add it via code view
  2. View the frontend
  3. the styles should be output correctly - the background image on the block should render