mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-25 00:35:40 -04:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user