From 8a6b38115456f592c8a246f9abbb84f4449721c0 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 25 Feb 2017 11:51:54 +0100 Subject: Sanitize Web site URL https://github.com/FreshRSS/FreshRSS/issues/1434 --- lib/lib_rss.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 560e5b256..78c9cabea 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -69,10 +69,10 @@ function idn_to_puny($url) { } function checkUrl($url) { - if (empty ($url)) { + if ($url == '') { return ''; } - if (!preg_match ('#^https?://#i', $url)) { + if (!preg_match('#^https?://#i', $url)) { $url = 'http://' . $url; } $url = idn_to_puny($url); //PHP bug #53474 IDN -- cgit v1.2.3