[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 29 20:26:35 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 dmsnell):

 @sparkopro I'm not seeing your comments here now, but I still have the
 emails from when they came in, and I'm struggling to see where the
 problems are. for instance, `<ul><li>Item 1<li>Item 2</ul>` was given as
 an input with `<ul><li>Item 1</li><li>Item 2</li></ul>` as the output –
 this seems correct according to the intention of `force_balance_tags()`.

 I was thinking that @programmin might be reporting a defect in the way
 that `force_balance_tags()` operates, but I think there's a chance I've
 misunderstood, and there's a complaint about the general goal of
 transforming partially-omitted markup into well-formed markup. is that
 right? such as, there's partial HTML whose closers are provided by some
 shortcode?

 `<li>It’s not here[my-closing-list-tag]` where `[my-closing-list-tag]` is
 rendered as `</li>`, and whereby `force_balance_tags()` closes the `<li>`
 before the shortcode is processed?

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


More information about the wp-trac mailing list