[wp-trac] [WordPress Trac] #31645: Press This: Reject relative URLs when scraping source html
WordPress Trac
noreply at wordpress.org
Tue Mar 17 14:18:22 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):
[attachment:31645.6.patch] will not work as is because `$url` goes through
`esc_url_raw()` before being tested, which prepends `http://` to whatever
value is passed to it... So `123.html` becomes `http://123.html/`, which
then matches
{{{
if ( $url && strlen( $url ) > 2 && $this->domain && $url{0} === '/' &&
$url{1} !== '/' ) {
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31645#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list