cmark

My personal build of CMark ✏️

Commit
291fd67499585b7989b0cfdd735473849e7a9146
Parent
c2e169cca07f6cc0e11b7b613edb7f82f38e81b3
Author
John MacFarlane <jgm@berkeley.edu>
Date

Use decodeURI instead of the deprecated 'unescape'.

<https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/unescape>

Diffstat

1 file changed, 1 insertion, 3 deletions

Status File Name N° Changes Insertions Deletions
Modified js/lib/common.js 4 1 3
diff --git 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) {