[wp-trac] [WordPress Trac] #14773: Error in slug parsing leads to unlimited URLs for the same article = duplicate content
WordPress Trac
noreply at wordpress.org
Tue Aug 13 11:37:39 UTC 2013
#14773: Error in slug parsing leads to unlimited URLs for the same article =
duplicate content
--------------------------------------------------+-----------------------
Reporter: thermoman | Owner:
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 3.7
Component: Canonical | Version: 2.5
Severity: normal | Resolution:
Keywords: 3.2-early has-patch needs-unit-tests |
--------------------------------------------------+-----------------------
Comment (by duck_):
Replying to [comment:12 atimmer]:
> I have added
[http://core.trac.wordpress.org/attachment/ticket/14773/tests.14773.1.diff
tests.14773.1.diff] which tests common wordpress canonical functionality
and adds this ticket to it as well, for which the tests fail.
Thanks for the tests! Not a big deal, but I don't really like the name of
the class. Maybe we just need to increase the number of tests in
`Tests_Canonical` which actually already has a test for this ticket.
> Edit:
> Adding to this, the patch
[http://core.trac.wordpress.org/attachment/ticket/14773/12456.2.diff
12456.2.diff] fixes only 1 of the testcases.
> It fixes: "/this--should-be-resolved-" -> "/this-should-be-resolved/"
> It does '''not''' fix: "/this----should---be---resolved-" -> "/this-
should-be-resolved/"
This isn't a problem with the patch since these URLs 404 on trunk. It
looks like the problem is that the multiple -s are being picked up as
octet placeholders by `sanitize_title_with_dashes()`, i.e. `---be---`
becomes `%be`. Maybe we should open a ticket to make a better placeholder.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14773#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list