tBKwtWS 8 anos atrás
pai
commit
b85fb2b186

+ 9 - 9
webgui/stats/templates/stats/network.html

@@ -116,7 +116,7 @@
                     var data = google.visualization.arrayToDataTable([
                         ['Channel', 'Messages'],
                         {% for channel in channelslist.items %}
-                            ['{{ channel.0 }}',     {{ channel.1.messagecount }}],
+                            ['{{ channel.0|escapejs }}',     {{ channel.1.messagecount }}],
                         {% endfor %}
                     ]);
                     var options = {
@@ -152,7 +152,7 @@
                     var data = google.visualization.arrayToDataTable([
                         ['Channel', 'Joins'],
                         {% for channel in channelslist.items %}
-                            ['{{ channel.0 }}',     {{ channel.1.joincount }}],
+                            ['{{ channel.0|escapejs }}',     {{ channel.1.joincount }}],
                         {% endfor %}
                     ]);
                     var options = {
@@ -188,7 +188,7 @@
                     var data = google.visualization.arrayToDataTable([
                         ['Channel', 'Kicks'],
                         {% for channel in channelslist.items %}
-                            ['{{ channel.0 }}',     {{ channel.1.kickcount }}],
+                            ['{{ channel.0|escapejs }}',     {{ channel.1.kickcount }}],
                         {% endfor %}
                     ]);
                     var options = {
@@ -224,7 +224,7 @@
                     var data = google.visualization.arrayToDataTable([
                         ['User', 'Messages'],
                         {% for item in userslist.items %}
-                            ['{{ item.0 }}',     {{ item.1.messagecount }}],
+                            ['{{ item.0|escapejs }}',     {{ item.1.messagecount }}],
                         {% endfor %}
                     ]);
                     var options = {
@@ -260,7 +260,7 @@
                     var data = google.visualization.arrayToDataTable([
                         ['User', 'Joins'],
                         {% for item in userslist.items %}
-                            ['{{ item.0 }}',     {{ item.1.joincount }}],
+                            ['{{ item.0|escapejs }}',     {{ item.1.joincount }}],
                         {% endfor %}
                     ]);
                     var options = {
@@ -296,7 +296,7 @@
                     var data = google.visualization.arrayToDataTable([
                         ['User', 'Kicks given'],
                         {% for item in userslist.items %}
-                            ['{{ item.0 }}',     {{ item.1.kgivencount }}],
+                            ['{{ item.0|escapejs }}',     {{ item.1.kgivencount }}],
                         {% endfor %}
                     ]);
                     var options = {
@@ -332,7 +332,7 @@
                     var data = google.visualization.arrayToDataTable([
                         ['User', 'Kicks received'],
                         {% for item in userslist.items %}
-                            ['{{ item.0 }}',     {{ item.1.kreceivedcount }}],
+                            ['{{ item.0|escapejs }}',     {{ item.1.kreceivedcount }}],
                         {% endfor %}
                     ]);
                     var options = {
@@ -368,7 +368,7 @@
                     var data = google.visualization.arrayToDataTable([
                         ['User', 'XP spent'],
                         {% for item in userslist.items %}
-                            ['{{ item.0 }}',     {{ item.1.xpspent }}],
+                            ['{{ item.0|escapejs }}',     {{ item.1.xpspent }}],
                         {% endfor %}
                     ]);
                     var options = {
@@ -404,7 +404,7 @@
                     var data = google.visualization.arrayToDataTable([
                         ['User', 'Coin'],
                         {% for item in userslist.items %}
-                            ['{{ item.0 }}',     {{ item.1.coin }}],
+                            ['{{ item.0|escapejs }}',     {{ item.1.coin }}],
                         {% endfor %}
                     ]);
                     var options = {

+ 3 - 3
webgui/stats/templates/stats/networks.html

@@ -99,7 +99,7 @@
                     var data = google.visualization.arrayToDataTable([
                         ['Network', 'Messages'],
                         {% for network in networkslist.items %}
-                            ['{{ network.0 }}',     {{ network.1.messagecount }}],
+                            ['{{ network.0|escapejs }}',     {{ network.1.messagecount }}],
                         {% endfor %}
                     ]);
                     var options = {
@@ -135,7 +135,7 @@
                     var data = google.visualization.arrayToDataTable([
                         ['Network', 'Users'],
                             {% for network in networkslist.items %}
-                                ['{{ network.0 }}',     {{ network.1.usercount }}],
+                                ['{{ network.0|escapejs }}',     {{ network.1.usercount }}],
                             {% endfor %}
                         ]);
                     var options = {
@@ -170,7 +170,7 @@
                     var data = google.visualization.arrayToDataTable([
                         ['Network', 'Channels'],
                             {% for network in networkslist.items %}
-                                ['{{ network.0 }}',     {{ network.1.channelcount }}],
+                                ['{{ network.0|escapejs }}',     {{ network.1.channelcount }}],
                             {% endfor %}
                         ]);
                     var options = {