[wp-trac] [WordPress Trac] #31645: Press This: Reject relative URLs when scraping source html
WordPress Trac
noreply at wordpress.org
Wed Mar 18 03:09:50 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 azaozz):
How about 31645.8.patch. It ensures we have an absolute or protocol
relative URL before passing it through `esc_url_raw()`. It is dependent on
having a proper `u` set, i.e. the page the user opened PT on or the URL
they pasted. Also changed the (weird looking) string offset `$str{0}`,
`$str{1}` checks with a regex, so it is easier to read :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31645#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list