[wp-trac] [WordPress Trac] #40958: force_balance_tags breaks Ninjaforms and probably other plugins that output html within js.
WordPress Trac
noreply at wordpress.org
Mon Apr 8 05:58:23 UTC 2024
#40958: force_balance_tags breaks Ninjaforms and probably other plugins that output
html within js.
--------------------------+---------------------------------
Reporter: programmin | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Shortcodes | Version: 4.7.4
Severity: normal | Resolution:
Keywords: | Focuses: ui, administration
--------------------------+---------------------------------
Comment (by boceksumuklu):
Hello Programmin,
Please don't forget to replace 14 with your form id.
{{{#!php
remove_filter( 'the_content', 'force_balance_tags' );
$content = apply_filters( 'the_content', $content_with_shortcodes );
add_filter( 'the_content', 'force_balance_tags' );
function my_ninja_form_shortcode_handler( $atts ) {
return ninja_forms_display_form( array( 'id' => 14 ) ); // Replace 14
with your form ID
}
add_shortcode( 'my_ninja_form', 'my_ninja_form_shortcode_handler' );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40958#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list