Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#56672 closed defect (bug) (worksforme)

6.1 Beta no longer allows SVG in custom block dynamic rendering

Reported by: robglidden Owned by:
Priority: high Milestone: 6.1
Component: Editor Version: 6.1
Severity: blocker Keywords:
Cc: Focuses:

Description

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.
  5. 🐞 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").

Change History (3)

#1 @audrasjb
4 years ago

  • Component General → Editor
  • Milestone Awaiting Review → 6.1
  • Priority normal → high

This ticket was mentioned in ​Slack in #core by audrasjb. ​View the logs.


4 years ago

#3 @robglidden
4 years ago

  • Resolution → worksforme
  • Status new → closed

For whatever reason, this is now working properly in 6.1 Beta 2

Note: See TracTickets for help on using tickets.