A free, self-hostable news aggregator…
Improve url_remove_credentials
Marien Fressinaud01a1179b1ae0
diff --git a/lib/lib_rss.php b/lib/lib_rss.phpindex 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);}