10up / safe-svg

Enable SVG uploads and sanitize them to stop XML/SVG vulnerabilities in your WordPress website.
https://wordpress.org/plugins/safe-svg/
GNU General Public License v2.0
272 stars 31 forks source link

How do I remove the style with the style with the id 'safe-svg-svg-icon-style-inline-css'? #148

Closed korn806 closed 9 months ago

korn806 commented 1 year ago

Describe your question

Since version 2.1 Safe SVG inserts a style tag with the id 'safe-svg-svg-icon-style-inline-css' into the head of the html. How do I remove this tag? I don't need it. It looks unnecessary.

Code of Conduct

dkotter commented 1 year ago

As of version 2.1.1, this CSS should only be added if you're on a post that is using the SVG block. In that case, this CSS is needed in order to properly style that block. If you're seeing this CSS be injected in places where the block isn't being used (and you're on v2.1.1+), let us know.

korn806 commented 1 year ago

Thanks for your reply. I am using v 2.2. I am not using blocks on my pages and Gutenberg is deactivated (Disable Gutenberg 3.0 plugin). Maybe a general has_blocks()/has_block() check before the injection of the style could help.