diff options
| author | 2015-03-22 22:54:29 +0100 | |
|---|---|---|
| committer | 2015-03-22 22:54:29 +0100 | |
| commit | ad9fe52f5a76faf58d13fcf7bde8f58e85abe82b (patch) | |
| tree | 917ad33120dc4aa5f760eee3238c1518a2bb37b6 /lib/lib_rss.php | |
| parent | 1a35e2271d3b9383e882371d37d5fef16abd745d (diff) | |
SimplePie sanitize URLs for syslog
https://github.com/FreshRSS/FreshRSS/issues/711
https://github.com/FreshRSS/FreshRSS/pull/715
Diffstat (limited to 'lib/lib_rss.php')
| -rw-r--r-- | lib/lib_rss.php | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 16ae3097f..65a1a8e04 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -181,7 +181,7 @@ function sanitizeHTML($data, $base = '') { function get_content_by_parsing ($url, $path) { require_once (LIB_PATH . '/lib_phpQuery.php'); - Minz_Log::notice('FreshRSS GET ' . url_remove_credentials($url)); + Minz_Log::notice('FreshRSS GET ' . SimplePie_Misc::url_remove_credentials($url)); $html = file_get_contents ($url); if ($html) { @@ -430,13 +430,3 @@ function array_push_unique(&$array, $value) { function array_remove(&$array, $value) { $array = array_diff($array, array($value)); } - - -/** - * Sanitize a URL by removing HTTP credentials. - * @param $url the URL to sanitize. - * @return the same URL without HTTP credentials. - */ -function url_remove_credentials($url) { - return preg_replace('/[^\/]*:[^:]*@/', '', $url); -} |
