From 26fa2b105d1520d7ee41d4385903628b2f6443a4 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 16 Jul 2013 01:14:23 -0700 Subject: parse_url: add missing scheme unless url begins with '/' --- mod/parse_url.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mod') diff --git a/mod/parse_url.php b/mod/parse_url.php index 783390f27..c206c24ec 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -232,6 +232,10 @@ function parse_url_content(&$a) { else $url = trim($_GET['url']); + if((substr($url,0,1) != '/') && (substr($url,0,4) != 'http')) + $url = 'http://' . $url; + + if($_GET['title']) $title = strip_tags(trim($_GET['title'])); -- cgit v1.2.3