htmlspecialchars decode – Why does HTML entities are still encoded in Code Block?


In the Code Block if I type in reversed character, they are encoded to HTML entities:

  • Input:

  • Output:

    <pre class="wp-block-code"><code>'&#91;] </code></pre>

Meanwhile, if I put them in the custom HTML block, the output characters aren’t encode:

  • Input:

  • Output:

    <code class="'[]"></code>
    <code><code class="'[]"></code></code>
    <pre class="wp-block-code"><code>'[]</code></pre>

I wonder why this should be the case? I enable troubleshooting mode and use the Twenty Twenty-One theme.

Related: Why does the custom HTML block not preserve the HTML characters?

Ooker 2 years 2022-01-07T05:05:51-05:00 0 Answers 0 views 0

Leave an answer