[wp-trac] [WordPress Trac] #11684: Comment Moderation Should Count $url
WordPress Trac
wp-trac at lists.automattic.com
Fri Jan 1 19:24:09 UTC 2010
#11684: Comment Moderation Should Count $url
-----------------------------+----------------------------------------------
Reporter: miqrogroove | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 3.0
Component: Comments | Version:
Severity: major | Keywords: has-patch
-----------------------------+----------------------------------------------
Comment(by Denis-de-Bernardy):
+1, but it's actually wrong to expect the anchor tag to be formatted that
way. all browsers accept the following garbage, for instance:
{{{
<a
href
=
http://foo.com
>bar</a>
}}}
and I vaguely remember one or two coping with white space between the
lesser than and the a:
{{{
<
a href="foo">bar</a>
}}}
so, a better regexp might be:
{{{
$links = preg_match_all("/<\s*a[^>]*\shref\s*=[^>]*>/",
apply_filters('comment_text',$comment));
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11684#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list