فهرست منبع

Trim spaces from user given url

Django Janny 8 سال پیش
والد
کامیت
5faa7aaf66
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      app/Controllers/feedController.php

+ 3 - 1
app/Controllers/feedController.php

@@ -39,12 +39,14 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
 	 * @throws FreshRSS_Feed_Exception
 	 * @throws Minz_FileNotExistException
 	 */
-	public static function addFeed($url, $title = '', $cat_id = 0, $new_cat_name = '', $http_auth = '') {
+	public static function addFeed($param_url, $title = '', $cat_id = 0, $new_cat_name = '', $http_auth = '') {
 		FreshRSS_UserDAO::touch();
 		@set_time_limit(300);
 
 		$catDAO = new FreshRSS_CategoryDAO();
 
+		$url = trim($param_url);
+
 		$cat = null;
 		if ($new_cat_name != '') {
 			$new_cat_id = $catDAO->addCategory(array('name' => $new_cat_name));