[wp-trac] [WordPress Trac] #39847: force_balance_tags not properly balancing < with <strong> and </strong>
WordPress Trac
noreply at wordpress.org
Sun Sep 22 05:30:40 UTC 2024
#39847: force_balance_tags not properly balancing < with <strong> and </strong>
--------------------------+------------------------------
Reporter: jpmerx | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 4.7.2
Severity: normal | Resolution:
Keywords: | Focuses: ui
--------------------------+------------------------------
Comment (by dmsnell):
@jpmerx I'm looking at replacing the internal logic of
`force_balance_tags()` to rely on the new `WP_HTML_Processor::normalize()`
method. That seems to resolve these issues.
{{{#!php
<?php
echo force_balance_tags( '\[<\] <strong>We</strong>' );
// \[<\] <strong>We</strong>
echo force_balance_tags( '< <strong>We</strong>' );
// < <strong>We</strong>
}}}
https://github.com/WordPress/wordpress-develop/pull/7409
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39847#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list