From 4af644fa220bf063dd16619d274992fa4918a5d7 Mon Sep 17 00:00:00 2001 From: mastihios <91783447+mastihios@users.noreply.github.com> Date: Tue, 5 Oct 2021 09:53:06 +0000 Subject: [PATCH] hrefs: replace HTML.escape w/ URI.encode_www_form --- src/invidious/views/add_playlist_items.ecr | 4 ++-- src/invidious/views/channel.ecr | 4 ++-- src/invidious/views/components/item.ecr | 4 ++-- src/invidious/views/playlists.ecr | 2 +- src/invidious/views/search.ecr | 12 ++++++------ 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/invidious/views/add_playlist_items.ecr b/src/invidious/views/add_playlist_items.ecr index 09eacbc8..c62861b0 100644 --- a/src/invidious/views/add_playlist_items.ecr +++ b/src/invidious/views/add_playlist_items.ecr @@ -41,7 +41,7 @@
<% if page > 1 %> - + <%= translate(locale, "Previous page") %> <% end %> @@ -49,7 +49,7 @@
<% if count >= 20 %> - + <%= translate(locale, "Next page") %> <% end %> diff --git a/src/invidious/views/channel.ecr b/src/invidious/views/channel.ecr index 09cfb76e..7f797e37 100644 --- a/src/invidious/views/channel.ecr +++ b/src/invidious/views/channel.ecr @@ -96,7 +96,7 @@
diff --git a/src/invidious/views/playlists.ecr b/src/invidious/views/playlists.ecr index d9a17a9b..1245256f 100644 --- a/src/invidious/views/playlists.ecr +++ b/src/invidious/views/playlists.ecr @@ -96,7 +96,7 @@
<% if continuation %> - &sort_by=<%= HTML.escape(sort_by) %><% end %>"> + &sort_by=<%= URI.encode_www_form(sort_by) %><% end %>"> <%= translate(locale, "Next page") %> <% end %> diff --git a/src/invidious/views/search.ecr b/src/invidious/views/search.ecr index fd176e41..36db2c8c 100644 --- a/src/invidious/views/search.ecr +++ b/src/invidious/views/search.ecr @@ -23,7 +23,7 @@ <% if operator_hash.fetch("date", "all") == date %> <%= translate(locale, date) %> <% else %> - &page=<%= page %>"> + &page=<%= page %>"> <%= translate(locale, date) %> <% end %> @@ -38,7 +38,7 @@ <% if operator_hash.fetch("content_type", "all") == content_type %> <%= translate(locale, content_type) %> <% else %> - &page=<%= page %>"> + &page=<%= page %>"> <%= translate(locale, content_type) %> <% end %> @@ -53,7 +53,7 @@ <% if operator_hash.fetch("duration", "all") == duration %> <%= translate(locale, duration) %> <% else %> - &page=<%= page %>"> + &page=<%= page %>"> <%= translate(locale, duration) %> <% end %> @@ -68,11 +68,11 @@ <% if operator_hash.fetch("features", "all").includes?(feature) %> <%= translate(locale, feature) %> <% elsif operator_hash.has_key?("features") %> - &page=<%= page %>"> + &page=<%= page %>"> <%= translate(locale, feature) %> <% else %> - &page=<%= page %>"> + &page=<%= page %>"> <%= translate(locale, feature) %> <% end %> @@ -87,7 +87,7 @@ <% if operator_hash.fetch("sort", "relevance") == sort %> <%= translate(locale, sort) %> <% else %> - &page=<%= page %>"> + &page=<%= page %>"> <%= translate(locale, sort) %> <% end %>