[wp-trac] [WordPress Trac] #22625: Lone less than (<) characters foul up balanceTags()
WordPress Trac
noreply at wordpress.org
Tue Dec 4 01:15:50 UTC 2012
#22625: Lone less than (<) characters foul up balanceTags()
--------------------------+------------------------------
Reporter: markjaquith | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Comment (by devesine):
Replying to [comment:2 azaozz]:
> Perhaps extend the `<3` regex to search for any < that don't look like
html tag start?
Hm, that seems like it would be very inefficient, but that gives me an
idea - it looks like we could change the tag regex, currently
{{{
"/<(\/?[\w:]*)\s*([^>]*)>/"
}}}
to require that a tag be present, like
{{{
"/<(\/?[\w:]+)\s*([^>]*)>/"
}}}
(and encode any < left sitting in the before-the-tag text). That seems to
work fine (and is much simpler), demonstrated in the -2 patch and unit
test.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22625#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list