From 01a1179b1ae0ee92234a0ef0a67c3e5d6d0b3c7e Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Thu, 29 Jan 2015 11:05:20 +0100 Subject: [PATCH] Improve url_remove_credentials Use @aledeg old function instead See https://github.com/FreshRSS/FreshRSS/pull/715 See https://github.com/FreshRSS/FreshRSS/issues/711 --- lib/lib_rss.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lib_rss.php b/lib/lib_rss.php index e2fcb1fee..e5fe73041 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -437,5 +437,5 @@ function array_remove(&$array, $value) { * @return the same URL without HTTP credentials. */ function url_remove_credentials($url) { - return preg_replace('#((.+)://)((.+)@)?(.+)#', '${1}${5}', $url); + return preg_replace('/[^\/]*:[^:]*@/', '', $url); }