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
This commit is contained in:
Marien Fressinaud
2015-01-29 11:05:20 +01:00
parent 8ff3e5363d
commit 01a1179b1a

View File

@@ -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);
}