Opened 6 years ago
Last modified 6 years ago
#40958 new defect (bug)
force_balance_tags breaks Ninjaforms and probably other plugins that output html within js.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.7.4 |
Component: | Shortcodes | Keywords: | |
Focuses: | ui, administration | Cc: |
Description
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 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.
Note: See
TracTickets for help on using
tickets.
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.