[wp-trac] [WordPress Trac] #20560: url_to_postid() string matching is not strict enough, can lead to incorrect results
WordPress Trac
noreply at wordpress.org
Wed Nov 7 20:19:37 UTC 2012
#20560: url_to_postid() string matching is not strict enough, can lead to incorrect
results
------------------------------+------------------
Reporter: gradyetc | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.5
Component: Query | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch commit |
------------------------------+------------------
Comment (by nacin):
I think the only change that actually needs to occur is `( false !==
strpos( $url, home_url() ) )`. Should this become `( false !== strpos(
trailingslashit( $url ), home_url( '/' ) ) )`? We don't want to avoid
matching a URL that is the same as the home_url() but minus the trailing
slash (as the examples in the ticket description, ironically).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20560#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list