Open masumsoft opened 8 years ago
A quick fix to the aforementioned issue is to apply a filter that does:
str.replace(/%25([A-Fa-f0-9]{2})/g, '%$1');
to remove double URL encoding after calling encodeURI in:
https://github.com/yahoo/xss-filters/blob/master/src/xss-filters.js#L326
Say the
url
variable has a value like the following:Now using the url variable in the handlebars corrupts the url:
The above url becomes corrupt by means of double urlencoding in one of it's get params like the following: