[wp-trac] [WordPress Trac] #11830: Link Moderation is Broken
WordPress Trac
wp-trac at lists.automattic.com
Sat Jan 9 02:20:56 UTC 2010
#11830: Link Moderation is Broken
--------------------------+-------------------------------------------------
Reporter: miqrogroove | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 2.9.2
Component: Comments | Version: 2.7.1
Severity: major | Keywords: has-patch needs-testing
--------------------------+-------------------------------------------------
Comment(by Denis-de-Bernardy):
there are issues in the regexp. see #11833, for starters. this garbage, in
particular:
{{{
<
a
<a
href =
http://foo:bar@foo.com#?#
<a
href = http://foo.com?\"'
>test</a>
test6
test5
}}}
results in the following after getting stripslashed with filters applied:
{{{
<
a
<a
href =
http://foo:bar@foo.com#?#
<a>test</a>
test6
test5
<p><<br />
a<br />
<a<br />
href =<br />
<a href="http://foo:bar@foo.com#?#"
rel="nofollow">http://foo:bar@foo.com#?#</a></p>
<p><a>test</a></p>
<p>test6</p>
<p>test5</p>
}}}
... so imo, we really ought to harden the beasty a little bit.
as an aside, I'd like to suggest:
1. we start by stripslashing the mess
2. we remove_filter whatever code annoys us (I'm looking at you, smileys)
3. we apply filters
4. and *then* we regexp the mess with something robust
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11830#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list