[wp-trac] [WordPress Trac] #11830: Link Moderation is Broken
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 1 13:26:19 UTC 2010
#11830: Link Moderation is Broken
---------------------------------------+------------------------------------
Reporter: miqrogroove | Owner:
Type: defect (bug) | Status: reopened
Priority: high | Milestone: 3.0
Component: Comments | Version: 2.7
Severity: major | Resolution:
Keywords: has-patch tested featured |
---------------------------------------+------------------------------------
Comment(by dd32):
Denis's patch here does fix the use-case provided. (However only \b is
needed, \\b is not)
I'd like to see the testdata that this function has been run against
however (before/after), its hard to tell what changes are needed here to
retain backwards compat.
Take this for example:
{{{
<a
href =
http://foo:bar@foo.com#?#
<a
href = http://foo.com?\"'
>test</a>
}}}
thats detected as one link by the current code. However, if we change it
to be non-greedy: {{{'/<a\b[^>]*?href/i'}}} (addition of ? after *) it
detects it as 2 links.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11830#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list