diff options
author | s1341 <github@shmarya.net> | 2013-11-19 18:16:59 +0200 |
---|---|---|
committer | s1341 <github@shmarya.net> | 2013-11-26 10:11:32 +0200 |
commit | 7550be09216807b7bacd036327f44726f148272c (patch) | |
tree | bfb19d722c5194f5253ac700cedc44140510eebd /src | |
parent | fb69e6b0a3337eae04a2cd3221c95a42993c1735 (diff) | |
download | etherpad-lite-7550be09216807b7bacd036327f44726f148272c.zip |
strip off trailing commas
Diffstat (limited to 'src')
-rw-r--r-- | src/static/js/admin/settings.js | 2 |
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); } |