[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
Tue Oct 15 08:22:12 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 sparkopro):
To see before-and-after examples of the output from force_balance_tags(),
you can create a small test plugin or theme where you manually call the
function and output the results. Here's a simple example of how you might
do this:
{{{
function test_force_balance_tags_shortcode($atts, $content = null) {
// Output before force balancing
$before = $content;
// Force balance tags
$after = force_balance_tags($content);
return
"<h2>Before:</h2><pre>$before</pre><h2>After:</h2><pre>$after</pre>";
}
add_shortcode('test_balance', 'test_force_balance_tags_shortcode');
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40958#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list