mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-19 11:28:51 +00:00
Migrate to a good Content Security Policy (#1023)
So attacks such as XSS (see [0]) will no longer be of an issue. [0]: https://github.com/omarroth/invidious/issues/1022
This commit is contained in:
@@ -71,14 +71,14 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
var community_data = {
|
||||
ucid: '<%= channel.ucid %>',
|
||||
youtube_comments_text: '<%= HTML.escape(translate(locale, "View YouTube comments")) %>',
|
||||
comments_text: '<%= HTML.escape(translate(locale, "View `x` comments", "{commentCount}")) %>',
|
||||
hide_replies_text: '<%= HTML.escape(translate(locale, "Hide replies")) %>',
|
||||
show_replies_text: '<%= HTML.escape(translate(locale, "Show replies")) %>',
|
||||
preferences: <%= env.get("preferences").as(Preferences).to_json %>,
|
||||
<script id="community_data" type="application/json">
|
||||
{
|
||||
"ucid": "<%= channel.ucid %>",
|
||||
"youtube_comments_text": "<%= HTML.escape(translate(locale, "View YouTube comments")) %>",
|
||||
"comments_text": "<%= HTML.escape(translate(locale, "View `x` comments", "{commentCount}")) %>",
|
||||
"hide_replies_text": "<%= HTML.escape(translate(locale, "Hide replies")) %>",
|
||||
"show_replies_text": "<%= HTML.escape(translate(locale, "Show replies")) %>",
|
||||
"preferences": <%= env.get("preferences").as(Preferences).to_json %>
|
||||
}
|
||||
</script>
|
||||
<script src="/js/community.js?v=<%= ASSET_COMMIT %>"></script>
|
||||
|
||||
Reference in New Issue
Block a user