summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authors1341 <github@shmarya.net>2013-11-19 18:16:59 +0200
committers1341 <github@shmarya.net>2013-11-26 10:11:32 +0200
commit7550be09216807b7bacd036327f44726f148272c (patch)
treebfb19d722c5194f5253ac700cedc44140510eebd /src
parentfb69e6b0a3337eae04a2cd3221c95a42993c1735 (diff)
downloadetherpad-lite-7550be09216807b7bacd036327f44726f148272c.zip
strip off trailing commas
Diffstat (limited to 'src')
-rw-r--r--src/static/js/admin/settings.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/static/js/admin/settings.js b/src/static/js/admin/settings.js
index ebe4a25a..fb3f2e97 100644
--- a/src/static/js/admin/settings.js
+++ b/src/static/js/admin/settings.js
@@ -55,6 +55,8 @@ $(document).ready(function () {
function isJSONClean(data){
var cleanSettings = JSON.minify(data);
+ // this is a bit naive. In theory some key/value might contain the sequences ',]' or ',}'
+ cleanSettings = cleanSettings.replace(",]","]").replace(",}","}");
try{
var response = jQuery.parseJSON(cleanSettings);
}