-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block Inline CSS gets always loaded #191
Comments
Yes, this bug is still there. A quick fix is to comment out the initiation of the blocks setup in line 170 of safe-svg.php. From But you will have to do that after every plugin update. A more robust workaround would be an action to allow the deactivation of the blocks setup in the functions.php when not needed. Something like this: Change the code in safe-svg.php from
to
Now you can disable the blogs setup with the following action in functions.php:
|
Curious if there are additional reproduction steps that could be provided here? I've tried reproducing this myself but the only time I see that CSS being loaded is if I'm on a post or page that uses the Safe SVG block. All other posts, pages, home page, etc don't load that CSS. I've tried testing both on content created with the Block Editor and content created with the Classic Editor, both posts and pages but I never see that CSS load unless the block is being used. |
As thomasbachem described: An old-style custom WordPress theme without blocks and upgraded to recent WP + Safe SVG versions. |
Describe the bug
The block inline CSS gets always added to every page:
It seems like commit 687092a intends to fix that, but it doesn't.
Steps to Reproduce
I don't use any blocks at all, just an old custom WordPress theme and upgraded to recent WP + Safe SVG versions.
It even happens on pages where there is no inline or external SVG image in the HTML output referenced at all.
Screenshots, screen recording, code snippet
No response
Environment information
No response
WordPress information
WordPress v6.4.3
Safe SVG v2.2.4
Code of Conduct
The text was updated successfully, but these errors were encountered: