diff --git a/lib/common.js b/lib/common.js index 3b2276e3..d3a01d0c 100644 --- a/lib/common.js +++ b/lib/common.js @@ -1,7 +1,6 @@ "use strict"; var encode = require('mdurl/encode'); -var decode = require('mdurl/decode'); var C_BACKSLASH = 92; @@ -56,7 +55,7 @@ var unescapeString = function(s) { var normalizeURI = function(uri) { try { - return encode(decode(uri)); + return encode(uri); } catch(err) { return uri; diff --git a/test/regression.txt b/test/regression.txt index ec5143ef..13c64a20 100644 --- a/test/regression.txt +++ b/test/regression.txt @@ -122,7 +122,15 @@ Double-encoding. ```````````````````````````````` example [XSS](javascript:alert%28'XSS'%29) . -
+ +```````````````````````````````` + +PR #179 + +```````````````````````````````` example +[link](https://www.example.com/home/%25batty) +. + ```````````````````````````````` Issue commonamrk#517 - script, pre, style close tag without