-
<%= mix.title %>
+ <%= HTML.escape(mix.title) %>
-
- <% mix.videos.each_slice(4) do |slice| %>
- <% slice.each do |item| %>
- <%= rendered "components/item" %>
- <% end %>
- <% end %>
+<% mix.videos.each do |item| %>
+ <%= rendered "components/item" %>
+<% end %>
diff --git a/src/invidious/views/playlist.ecr b/src/invidious/views/playlist.ecr
index 377da20f..b1fee211 100644
--- a/src/invidious/views/playlist.ecr
+++ b/src/invidious/views/playlist.ecr
@@ -1,17 +1,20 @@
+<% title = HTML.escape(playlist.title) %>
+<% author = HTML.escape(playlist.author) %>
+
<% content_for "header" do %>
-
<%= playlist.title %> - Invidious
+
<%= title %> - Invidious
<% end %>
-
<%= playlist.title %>
+
<%= title %>
<% if playlist.is_a? InvidiousPlaylist %>
<% if playlist.author == user.try &.email %>
- <%= playlist.author %> |
+ <%= author %> |
<% else %>
- <%= playlist.author %> |
+ <%= author %> |
<% end %>
<%= translate(locale, "`x` videos", "#{playlist.video_count}") %> |
<%= translate(locale, "Updated `x` ago", recode_date(playlist.updated, locale)) %> |
@@ -26,11 +29,12 @@
<% else %>
- <%= playlist.author %> |
+ <%= author %> |
<%= translate(locale, "`x` videos", "#{playlist.video_count}") %> |
<%= translate(locale, "Updated `x` ago", recode_date(playlist.updated, locale)) %>
<% end %>
+
<% if !playlist.is_a? InvidiousPlaylist %>
<% end %>
@@ -93,11 +96,9 @@
<% end %>
- <% videos.each_slice(4) do |slice| %>
- <% slice.each do |item| %>
- <%= rendered "components/item" %>
- <% end %>
- <% end %>
+<% videos.each do |item| %>
+ <%= rendered "components/item" %>
+<% end %>
diff --git a/src/invidious/views/playlists.ecr b/src/invidious/views/playlists.ecr
index 3f892650..d9a17a9b 100644
--- a/src/invidious/views/playlists.ecr
+++ b/src/invidious/views/playlists.ecr
@@ -1,5 +1,8 @@
+<% ucid = channel.ucid %>
+<% author = HTML.escape(channel.author) %>
+
<% content_for "header" do %>
-
<%= channel.author %> - Invidious
+
<%= author %> - Invidious
<% end %>
<% if channel.banner %>
@@ -16,12 +19,12 @@
-
<%= channel.author %>
+
<%= author %>
@@ -33,8 +36,6 @@
- <% ucid = channel.ucid %>
- <% author = channel.author %>
<% sub_count_text = number_to_short_text(channel.sub_count) %>
<%= rendered "components/subscribe_widget" %>
@@ -42,7 +43,7 @@
@@ -50,7 +51,7 @@
<% if !channel.auto_generated %>
@@ -59,7 +60,7 @@
@@ -71,7 +72,7 @@
<% if sort_by == sort %>
<%= translate(locale, sort) %>
<% else %>
-
+
<%= translate(locale, sort) %>
<% end %>
@@ -86,18 +87,16 @@
- <% items.each_slice(4) do |slice| %>
- <% slice.each do |item| %>
- <%= rendered "components/item" %>
- <% end %>
- <% end %>
+<% items.each do |item| %>
+ <%= rendered "components/item" %>
+<% end %>
<% if continuation %>
-
&sort_by=<%= HTML.escape(sort_by) %><% end %>">
+ &sort_by=<%= HTML.escape(sort_by) %><% end %>">
<%= translate(locale, "Next page") %>
<% end %>
diff --git a/src/invidious/views/popular.ecr b/src/invidious/views/popular.ecr
index 62abb12a..e77f35b9 100644
--- a/src/invidious/views/popular.ecr
+++ b/src/invidious/views/popular.ecr
@@ -12,9 +12,7 @@
<%= rendered "components/feed_menu" %>
- <% popular_videos.each_slice(4) do |slice| %>
- <% slice.each do |item| %>
- <%= rendered "components/item" %>
- <% end %>
- <% end %>
+<% popular_videos.each do |item| %>
+ <%= rendered "components/item" %>
+<% end %>
diff --git a/src/invidious/views/search.ecr b/src/invidious/views/search.ecr
index 15389dce..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 @@
- <% videos.each_slice(4) do |slice| %>
- <% slice.each do |item| %>
- <%= rendered "components/item" %>
- <% end %>
+ <% videos.each do |item| %>
+ <%= rendered "components/item" %>
<% end %>
<% if page > 1 %>
-
+
<%= translate(locale, "Previous page") %>
<% end %>
@@ -139,7 +139,7 @@
<% if count >= 20 %>
-
+
<%= translate(locale, "Next page") %>
<% end %>
diff --git a/src/invidious/views/subscription_manager.ecr b/src/invidious/views/subscription_manager.ecr
index 6cddcd6c..acf015f5 100644
--- a/src/invidious/views/subscription_manager.ecr
+++ b/src/invidious/views/subscription_manager.ecr
@@ -10,15 +10,15 @@
-
-
+
-
-
+
+
<%= translate(locale, "Import/export") %>
@@ -31,7 +31,7 @@
diff --git a/src/invidious/views/subscriptions.ecr b/src/invidious/views/subscriptions.ecr
index af1d4fbc..97184e2b 100644
--- a/src/invidious/views/subscriptions.ecr
+++ b/src/invidious/views/subscriptions.ecr
@@ -11,13 +11,13 @@
<%= translate(locale, "Manage subscriptions") %>
-
-
+
-
-
+
@@ -34,11 +34,9 @@
<% end %>
- <% notifications.each_slice(4) do |slice| %>
- <% slice.each do |item| %>
- <%= rendered "components/item" %>
- <% end %>
- <% end %>
+<% notifications.each do |item| %>
+ <%= rendered "components/item" %>
+<% end %>
@@ -55,11 +53,9 @@
- <% videos.each_slice(4) do |slice| %>
- <% slice.each do |item| %>
- <%= rendered "components/item" %>
- <% end %>
- <% end %>
+<% videos.each do |item| %>
+ <%= rendered "components/item" %>
+<% end %>
diff --git a/src/invidious/views/trending.ecr b/src/invidious/views/trending.ecr
index 3ec62555..a35c4ee3 100644
--- a/src/invidious/views/trending.ecr
+++ b/src/invidious/views/trending.ecr
@@ -41,9 +41,7 @@
- <% trending.each_slice(4) do |slice| %>
- <% slice.each do |item| %>
- <%= rendered "components/item" %>
- <% end %>
- <% end %>
+<% trending.each do |item| %>
+ <%= rendered "components/item" %>
+<% end %>
diff --git a/src/invidious/views/view_all_playlists.ecr b/src/invidious/views/view_all_playlists.ecr
index 5ec6aa31..868cfeda 100644
--- a/src/invidious/views/view_all_playlists.ecr
+++ b/src/invidious/views/view_all_playlists.ecr
@@ -16,11 +16,9 @@
- <% items_created.each_slice(4) do |slice| %>
- <% slice.each do |item| %>
- <%= rendered "components/item" %>
- <% end %>
- <% end %>
+<% items_created.each do |item| %>
+ <%= rendered "components/item" %>
+<% end %>
@@ -30,9 +28,7 @@
- <% items_saved.each_slice(4) do |slice| %>
- <% slice.each do |item| %>
- <%= rendered "components/item" %>
- <% end %>
- <% end %>
+<% items_saved.each do |item| %>
+ <%= rendered "components/item" %>
+<% end %>
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr
index c553dc0e..aeb0f476 100644
--- a/src/invidious/views/watch.ecr
+++ b/src/invidious/views/watch.ecr
@@ -1,10 +1,15 @@
+<% ucid = video.ucid %>
+<% title = HTML.escape(video.title) %>
+<% author = HTML.escape(video.author) %>
+
+
<% content_for "header" do %>
">
-
+
@@ -16,7 +21,7 @@
-
+
@@ -24,7 +29,7 @@
<%= rendered "components/player_sources" %>
-<%= HTML.escape(video.title) %> - Invidious
+<%= title %> - Invidious