How to allow HTML tags into WP Bakery (formerly Visual Composer) `textfield` parameter

You need to change the type from textarea to textarea_raw_html:

Under the section “Available type values” it says:

textarea_raw_html: Text area, its content will be coded into base64 (this allows you to store raw js or raw html code)

Although I’m not sure why they can base64 encode the output from this but not the textarea_html box with its nice formatting – an annoying limitation.

UPDATE It looks like you have to jump through some hoops when you switch to the textarea_raw_html param type.

To use the value you need to manually decode it with:

$atts['some_param'] =  rawurldecode( base64_decode( $atts['some_param'] ) );

Leave a Comment