From a5d0a3f9ef85c0707ae3211bb85be89c1ac829f1 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Mon, 18 Nov 2013 14:00:54 +0100 Subject: [PATCH] HTML validation --- lib/chibi-core | 2 +- src/Controllers/PostController.php | 4 ++-- src/Controllers/TagController.php | 2 +- src/Views/index-index.phtml | 8 ++++---- src/Views/layout-normal.phtml | 2 +- src/Views/user-settings.phtml | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/chibi-core b/lib/chibi-core index bf824e78..5008621b 160000 --- a/lib/chibi-core +++ b/lib/chibi-core @@ -1 +1 @@ -Subproject commit bf824e781c520a85a82394622a5fefd5c178379f +Subproject commit 5008621b75431073ca8dd6537a112c9f95436e54 diff --git a/src/Controllers/PostController.php b/src/Controllers/PostController.php index bfadf93b..f9521066 100644 --- a/src/Controllers/PostController.php +++ b/src/Controllers/PostController.php @@ -80,12 +80,12 @@ class PostController $this->context->transport->searchQuery = $formQuery; if (strpos($formQuery, '/') !== false) throw new SimpleException('Search query contains invalid characters'); - $url = \Chibi\UrlHelper::route('post', 'list', ['source' => $source, 'additionalInfo' => $additionalInfo, 'query' => urlencode($formQuery)]); + $url = \Chibi\UrlHelper::route('post', 'list', ['source' => $source, 'additionalInfo' => $additionalInfo, 'query' => $formQuery]); \Chibi\UrlHelper::forward($url); return; } - $query = trim(urldecode($query)); + $query = trim($query); $page = intval($page); $postsPerPage = intval($this->config->browsing->postsPerPage); $this->context->subTitle = 'posts'; diff --git a/src/Controllers/TagController.php b/src/Controllers/TagController.php index 9f0f4f86..ab0458c1 100644 --- a/src/Controllers/TagController.php +++ b/src/Controllers/TagController.php @@ -126,7 +126,7 @@ class TagController $suppliedQuery = ' '; $suppliedTag = InputHelper::get('tag'); $suppliedTag = Model_Tag::validateTag($suppliedTag); - \Chibi\UrlHelper::forward(\Chibi\UrlHelper::route('post', 'list', ['source' => 'mass-tag', 'query' => urlencode($suppliedQuery), 'additionalInfo' => $suppliedTag])); + \Chibi\UrlHelper::forward(\Chibi\UrlHelper::route('post', 'list', ['source' => 'mass-tag', 'query' => $suppliedQuery, 'additionalInfo' => $suppliedTag])); } } } diff --git a/src/Views/index-index.phtml b/src/Views/index-index.phtml index 754746ba..205af2bf 100644 --- a/src/Views/index-index.phtml +++ b/src/Views/index-index.phtml @@ -13,7 +13,7 @@ diff --git a/src/Views/layout-normal.phtml b/src/Views/layout-normal.phtml index 55349003..4e259005 100644 --- a/src/Views/layout-normal.phtml +++ b/src/Views/layout-normal.phtml @@ -103,7 +103,7 @@ szurubooru v - Logs + Logs diff --git a/src/Views/user-settings.phtml b/src/Views/user-settings.phtml index 4f1fd1b9..77f571f3 100644 --- a/src/Views/user-settings.phtml +++ b/src/Views/user-settings.phtml @@ -1,6 +1,6 @@
- +
@@ -12,10 +12,10 @@
- +