mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-23 11:28:49 +00:00
Multiple front-end fixes (#2247)
Fixes: * Sanitize user-provided content in HTML (Fixes #2193) * Fix encoding of search query in prev/next pages (Fixes #2229) * Fix some issues introduced with #2196: - Fix alignment of all <h3> elements (Move the inline style from the parent to the <h3> element) - Add missing comma on 'dir' HTML attribute (Typo introduced by PR #2196) Code cleaning: * Remove unnecessary 'each_sclice' + 'each' double loop in ECR files * Clean the player's <source> list generation code (in player.ecr)
This commit is contained in:
@@ -312,6 +312,8 @@ def template_youtube_comments(comments, locale, thin_mode, is_replies = false)
|
||||
author_thumbnail = ""
|
||||
end
|
||||
|
||||
author_name = HTML.escape(child["author"].as_s)
|
||||
|
||||
html << <<-END_HTML
|
||||
<div class="pure-g" style="width:100%">
|
||||
<div class="channel-profile pure-u-4-24 pure-u-md-2-24">
|
||||
@@ -320,7 +322,7 @@ def template_youtube_comments(comments, locale, thin_mode, is_replies = false)
|
||||
<div class="pure-u-20-24 pure-u-md-22-24">
|
||||
<p>
|
||||
<b>
|
||||
<a class="#{child["authorIsChannelOwner"] == true ? "channel-owner" : ""}" href="#{child["authorUrl"]}">#{child["author"]}</a>
|
||||
<a class="#{child["authorIsChannelOwner"] == true ? "channel-owner" : ""}" href="#{child["authorUrl"]}">#{author_name}</a>
|
||||
</b>
|
||||
<p style="white-space:pre-wrap">#{child["contentHtml"]}</p>
|
||||
END_HTML
|
||||
|
||||
Reference in New Issue
Block a user