Bladeren bron

Merge pull request #1778 from keltroth/trimurl

Trim spaces from user given url
Alexandre Alapetite 8 jaren geleden
bovenliggende
commit
81df36ed54
2 gewijzigde bestanden met toevoegingen van 3 en 0 verwijderingen
  1. 1 0
      CREDITS.md
  2. 2 0
      app/Controllers/feedController.php

+ 1 - 0
CREDITS.md

@@ -19,6 +19,7 @@ People are sorted by name so please keep this order.
 * [danc](https://github.com/danc): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=danc), [Web](http://tintouli.free.fr/)
 * [David Souza](https://github.com/araujo0205): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:araujo0205), [Web](http://davidsouza.tech/)
 * [dswd](https://github.com/dswd): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:dswd)
+* [Django Janny](https://github.com/keltroth): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:keltroth)
 * [ealdraed](https://github.com/ealdraed): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=ealdraed)
 * [Frans de Jonge](https://github.com/Frenzie): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=Frenzie), [Web](http://fransdejonge.com/)
 * [gsongsong](https://github.com/gsongsong): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:gsongsong)

+ 2 - 0
app/Controllers/feedController.php

@@ -45,6 +45,8 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
 
 		$catDAO = new FreshRSS_CategoryDAO();
 
+		$url = trim($url);
+
 		$cat = null;
 		if ($new_cat_name != '') {
 			$new_cat_id = $catDAO->addCategory(array('name' => $new_cat_name));