Support

Account

Home Forums Gutenberg Problem with block html output

Solving

Problem with block html output

    • cesar

    • February 22, 2021 at 10:14 pm

    Hi,

    I’m developing a block with ACF to render and external API html. It works fine with plain html but I’ve a problem when this html has inline scripts because of the block output has been filtered and all ‘&’ characters has been changed by ‘&’ entity and this cause that resulting javascript not work.

    Example:

    API return: <script type="text/javascript">if(varA == '' && varB ) { ... }</script>
    Block output: <script type="text/javascript">if(varA == '' &# 038;& #038; varB ) { ... }>;/script>
    without the space between # and 038 🙂

    Anyone knows how can I avoid this filtering?

    Best Regards,
    César.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.