From e5063ef9284aebfb4c32b13418c43bffef3d6dd1 Mon Sep 17 00:00:00 2001 From: syeopite Date: Sat, 26 Jun 2021 19:20:50 -0700 Subject: [PATCH] Escape (some) channel names in frontend --- src/invidious/comments.cr | 2 +- src/invidious/views/channel/featured_channels.ecr | 4 ++-- .../views/components/channels/channel-information.ecr | 2 +- src/invidious/views/playlist.ecr | 4 ++-- src/invidious/views/watch.ecr | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index a5506b03..fcf6e193 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -472,7 +472,7 @@ def template_reddit_comments(root, locale) html << <<-END_HTML

[ - ] - #{child.author} + #{HTML.escape(child.author)} #{translate(locale, "`x` points", number_with_separator(child.score))} #{translate(locale, "`x` ago", recode_date(child.created_utc, locale))} #{translate(locale, "permalink")} diff --git a/src/invidious/views/channel/featured_channels.ecr b/src/invidious/views/channel/featured_channels.ecr index 2829c780..c9c5ad46 100644 --- a/src/invidious/views/channel/featured_channels.ecr +++ b/src/invidious/views/channel/featured_channels.ecr @@ -37,7 +37,7 @@ <% end %>