[wp-trac] [WordPress Trac] #56672: 6.1 Beta no longer allows SVG in custom block dynamic rendering
WordPress Trac
noreply at wordpress.org
Tue Sep 27 22:47:31 UTC 2022
#56672: 6.1 Beta no longer allows SVG in custom block dynamic rendering
--------------------------+-----------------------------
Reporter: robglidden | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: blocker | Keywords:
Focuses: |
--------------------------+-----------------------------
= Testing Instructions
=== Steps to Reproduce
1. In WP 6.0, create a custom block with dynamic HTML rendering
2. In the 'render_callback' php function, return an SVG as part of the
returned content.
3. The SVG renders on the front end as expected.
4. Switch to WP 6.1 with the beta tester plugin.
3. 🐞 The SVG disappears on the front end. It is stripped from the HTML>
I imagine that there is some new escaping on the HTML returned from the
'render_callback' function.
However, there needs to be some way to insert an SVG in a dynamic PHP-
rendered custom block.
I also notice the same stripping of SVG occurs when I use the new
block.json render feature ("render": "file:./render.php").
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56672>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list