summaryrefslogtreecommitdiffstats
path: root/assets/js/community.js
diff options
context:
space:
mode:
authorleonklingele <git@leonklingele.de>2020-03-16 06:46:08 +0900
committerGitHub <noreply@github.com>2020-03-15 16:46:08 -0500
commit70cbe91776d1de10f2767c6a5ad5912fd705bdd3 (patch)
tree2ab21e5b82d7018c766253008076c8e49c3aa5e5 /assets/js/community.js
parentf92027c44b043c19188ce9945c3f05e6dc90de5a (diff)
downloadinvidious-70cbe91776d1de10f2767c6a5ad5912fd705bdd3.tar.gz
invidious-70cbe91776d1de10f2767c6a5ad5912fd705bdd3.tar.bz2
invidious-70cbe91776d1de10f2767c6a5ad5912fd705bdd3.zip
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
Diffstat (limited to 'assets/js/community.js')
-rw-r--r--assets/js/community.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/assets/js/community.js b/assets/js/community.js
index 754ec6d3..4077f1cd 100644
--- a/assets/js/community.js
+++ b/assets/js/community.js
@@ -1,3 +1,5 @@
+var community_data = JSON.parse(document.getElementById('community_data').innerHTML);
+
String.prototype.supplant = function (o) {
return this.replace(/{([^{}]*)}/g, function (a, b) {
var r = o[b];