From c71dc612210587b64998a5f96a6d6e7d0dfd81c2 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Sat, 10 Jul 2021 16:53:26 +0200 Subject: [PATCH] Fix encoding of search query in prev/next pages Fixes #2229 --- src/invidious/views/search.ecr | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/invidious/views/search.ecr b/src/invidious/views/search.ecr index cd4aef1b..fd176e41 100644 --- a/src/invidious/views/search.ecr +++ b/src/invidious/views/search.ecr @@ -2,6 +2,8 @@ <%= search_query.not_nil!.size > 30 ? HTML.escape(query.not_nil![0,30].rstrip(".") + "...") : HTML.escape(query.not_nil!) %> - Invidious <% end %> +<% search_query_encoded = env.get?("search").try { |x| URI.encode(x.as(String), space_to_plus: true) } %> + <% if count == 0 %>

@@ -105,7 +107,7 @@
<% if page > 1 %> - + <%= translate(locale, "Previous page") %> <% end %> @@ -113,7 +115,7 @@
<% if count >= 20 %> - + <%= translate(locale, "Next page") %> <% end %> @@ -129,7 +131,7 @@
<% if page > 1 %> - + <%= translate(locale, "Previous page") %> <% end %> @@ -137,7 +139,7 @@
<% if count >= 20 %> - + <%= translate(locale, "Next page") %> <% end %>