Make WordPress Core

Opened 7 years ago

Last modified 3 weeks ago

#40958 new defect (bug)

force_balance_tags breaks Ninjaforms and probably other plugins that output html within js.

Reported by: programmin's profile programmin Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7.4
Component: Shortcodes Keywords:
Focuses: ui, administration Cc:


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 :


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.

Change History (1)

#1 @programmin
7 years ago

It would be nice if there were a filter always applied at the end of the force balance function, for the possibility of cleaning up bugs like this.

Note: See TracTickets for help on using tickets.