NO BUG: HTML and JS in dynamic tag

I enter custom fields from MetaBox into the “code” element - html and css.
I have sanitize code - none set in MB. The entire correct code is stored in the database. When I print it using a dynamic tag, some HTML tags are missing in the HTML ( ) and in JS, for example, & changes to & . So the code obviously doesn’t work. When I print the custom field in the HTML part of the “code” element using PHP

<?php echo get_post_meta($post_id, 'text_html', true); ?>

everything is printed correctly.

I tried deactivate all plugins.

It looks like Bricks is translating dynamic tags incorrectly.? O.o

Hi,

yes, Bricks does sanitize the output of dynamic tags using wp_kses_post, but since 1.11.1, there is also @sanitize:false key-value argument, that you can try to use.

Hope this helps,
Matej

That’s it! Thank you.

1 Like

Perfect, thanks. Will mark this one as no bug :slight_smile:

Matej

you need to ensure that when you output the custom field in the code element, it bypasses WordPress’ default sanitization process.