[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
Thu Jun 8 21:16:49 UTC 2017


#40958: force_balance_tags breaks Ninjaforms and probably other plugins that output
html within js.
--------------------------------+-----------------------------
 Reporter:  programmin          |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Shortcodes          |    Version:  4.7.4
 Severity:  normal              |   Keywords:
  Focuses:  ui, administration  |
--------------------------------+-----------------------------
 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40958>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list