Support

Account

Home Forums Gutenberg Problem with block html output

Solving

Problem with block html output

  • 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.