From 14cd6c829c8de258135e0b8b15ff6758b4c97434 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 | 4 ++-- src/invidious/views/channel/featured_channels.ecr | 4 ++-- .../views/components/channels/channel-information.ecr | 2 +- src/invidious/views/edit_playlist.ecr | 2 +- src/invidious/views/playlist.ecr | 4 ++-- src/invidious/views/subscription_manager.ecr | 2 +- src/invidious/views/watch.ecr | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index 81d6ac2b..0b4a530e 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -320,7 +320,7 @@ def template_youtube_comments(comments, locale, thin_mode, is_replies = false)

- #{child["author"]} + #{HTML.escape(child["author"].to_s)}

#{child["contentHtml"]}

END_HTML @@ -458,7 +458,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 %>