fix string unescaping

This commit is contained in:
Pavol Bielik 2015-01-29 12:29:11 +01:00
parent 8bfc409ff0
commit 53aaf2e606
3 changed files with 6 additions and 2 deletions

View File

@ -223,7 +223,7 @@ function processFile(file) {
var inferred_names = {};
for (var i = 0; i < result.length; i++) {
if (result[i].hasOwnProperty("inf")) {
inferred_names[result[i].v] = result[i].inf.green;
inferred_names[result[i].v] = UglifyJS.unescapeString(result[i].inf).green;
}
}
try {

View File

@ -596,6 +596,10 @@ function escapeString(input){
}
}
function unescapeString(input){
return decodeURIComponent(input);
}
function parseFile(code, file) {
var toplevel = parse(code, {
filename : file

View File

@ -3,7 +3,7 @@
"description": "JavaScript tool that renames variables and parameters to names based on statistical model learnt from thousands of open source projects",
"homepage": "https://github.com/eth-srl/UnuglifyJS",
"main": "tools/node.js",
"version": "0.9.3",
"version": "0.9.4",
"engines": { "node" : ">=0.4.0" },
"maintainers": [{
"name": "Pavol Bielik",