• Resolved kaizensoftware

    (@kaizensoftware)


    HTML tags aren’t being properly escaped. They’re being rendered as actual HTML elements.

    Here’s a screenshot of the output:
    https://paste.pics/D4SQR

    I’m using Gutenburg for editing the posts. I add a Prismatic block and select the appropriate language. The HTML is being rendered instead of being formatted as code.

    This is a default WordPress installation. Prismatic is the only enabled plugin. I’ve switched to the Twenty Twenty-One theme and the issue persisted, so it doesn’t appear to be my theme.

    I’ve uninstalled/reinstalled Prismatic and it’s had no effect. If you look at the HTML output, you can see that the HTML content in the Prismatic block has been converted to raw HTML. The WordPress Code element wraps everything in double quotes, but all the code is there exactly as I pasted it.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Thanks for reporting. To help me investigate and try to resolve, can you provide steps to repeat the issue on default WordPress. You’ve got a lot of infos in your post, so just need the basic steps to make sure it’s all in order and not missing anything, etc. Thank you.

    • This reply was modified 3 years, 4 months ago by Jeff Starr.
    Thread Starter kaizensoftware

    (@kaizensoftware)

    1. Add a new prismatic block
    2. Paste in html code

    <td class="img" width="55" style="font-size:0pt; line-height:0pt; text-align:left;"><a href="#" target="_blank"><img src="images/t6_ico_facebook.jpg" width="34" height="34" border="0" alt="" /></a></td>

    3. Publish

    Plugin Author Jeff Starr

    (@specialk)

    Perfect, thanks. Will look into it for the next plugin update, should be before WP 5.8 is released or thereabouts.

    Plugin Author Jeff Starr

    (@specialk)

    Update: after much investigation, I narrowed down the issue to one thing: the block editor force escapes left-angle brackets and other characters. I’ve tried many different things, ways of adding block elements and so forth, but so far nothing works.

    So, the plan is to ask for help from the WP community. I posted a forum topic here explaining the issue and asking for help. I’m not sure if it’s even possible to achieve. If it is, then Prismatic will continue to provide its own Gutenberg block. If not, then the block will be discontinued.

    If you or anyone has insight on how to add code snippets *raw* unescaped into a block, please let me know. Check the above-linked support topic for more details. Thank you.

    Plugin Author Jeff Starr

    (@specialk)

    Update: Finally figured it out, it was an issue with the render callback function.

    So that means Prismatic will continue to provide the same blocks as before, only without the weird code-escaping bug.

    Thanks for reporting, @kaizensoftware.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘2.8 not properly displaying HTML’ is closed to new replies.