summaryrefslogtreecommitdiff
path: root/js/lib/common.js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-12 09:05:28 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-12 09:05:28 -0800
commit291fd67499585b7989b0cfdd735473849e7a9146 (patch)
tree7f92c2bbc809026b62a4ab84ba0b8df6eee16e48 /js/lib/common.js
parentc2e169cca07f6cc0e11b7b613edb7f82f38e81b3 (diff)
Use decodeURI instead of the deprecated 'unescape'.
<https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/unescape>
Diffstat (limited to 'js/lib/common.js')
-rw-r--r--js/lib/common.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/js/lib/common.js b/js/lib/common.js
index 06486d3..6481c68 100644
--- a/js/lib/common.js
+++ b/js/lib/common.js
@@ -1,7 +1,5 @@
"use strict";
-/* global unescape */
-
var entityToChar = require('./html5-entities.js').entityToChar;
var ENTITY = "&(?:#x[a-f0-9]{1,8}|#[0-9]{1,8}|[a-z][a-z0-9]{1,31});";
@@ -36,7 +34,7 @@ var unescapeString = function(s) {
};
var normalizeURI = function(uri) {
- return encodeURI(unescape(uri));
+ return encodeURI(decodeURI(uri));
};
var replaceUnsafeChar = function(s) {