[wp-trac] [WordPress Trac] #31645: Press This: Reject relative URLs when scraping source html
WordPress Trac
noreply at wordpress.org
Mon Mar 16 14:06:31 UTC 2015
#31645: Press This: Reject relative URLs when scraping source html
--------------------------+--------------------
Reporter: kraftbj | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.2
Component: Press This | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+--------------------
Comment (by stephdau):
Why would we reject canonical links from root?
I've suggested dealing with them as so in
https://core.trac.wordpress.org/attachment/ticket/31637/31637.2.diff
(other ticket)
{{{
if ( preg_match( '/^[\/]{1}[^\/]+/', $link ) ) {
$link = preg_replace( '/^(https?:\/\/[^\/]+)(\/.*)?$/', '\1',
$data['u'] ) . $link;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31645#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list