From 2592fc8ed0cdc8784bde2498317920391533016b Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 1 Apr 2013 20:12:39 +0200 Subject: [PATCH] Fix #978. It's magic! No need to unescape. --- 4chan_x.user.js | 2 +- changelog | 2 ++ script.coffee | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index c0bdc8909..a1b2fe635 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3046,7 +3046,7 @@ reader.onload = function(e) { var data, err; try { - data = JSON.parse(decodeURIComponent(escape(e.target.result))); + data = JSON.parse(e.target.result); Options.loadSettings(data); if (confirm('Import successful. Refresh now?')) { return window.location.reload(); diff --git a/changelog b/changelog index 152109283..2c112b37f 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ master +- Mayhem + Fix importing settings containing unicode characters. 2.39.1 - Mayhem diff --git a/script.coffee b/script.coffee index 76c722933..431aee8b6 100644 --- a/script.coffee +++ b/script.coffee @@ -2465,7 +2465,7 @@ Options = reader = new FileReader() reader.onload = (e) -> try - data = JSON.parse decodeURIComponent escape e.target.result + data = JSON.parse e.target.result Options.loadSettings data if confirm 'Import successful. Refresh now?' window.location.reload()