[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
Wed Dec 4 07:23:58 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 venzodeee23):
Replying to [ticket:40958 programmin]:
> If you have a shortcode for Ninjaforms and use the post in a context
that runs force_balance_tags() it seriously breaks the script. For example
if you have a form id=14, add this :
> {{{#!php
> <?php
>
> echo 'NO BALANCE:--'. apply_filters('the_content', '[ninja_form id=14]'
) .' --END NO BALANCE. ';
> echo 'BALANCED:--'. force_balance_tags(apply_filters('the_content',
'[ninja_form id=14]' )) .' --END BALANCED. ';
> }}}
> Notice that some ending /spans, /is, and or /as are added before the end
script, breaking it. Seems to not be wp version dependent.
I would love to hear more on this!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40958#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list