Update encoding.

Note that using some unicode characters is broken due to UglifyJS.
This commit is contained in:
Pavol Bielik 2015-01-25 16:37:14 +01:00
parent b2198226dd
commit 2afb966fbf

View File

@ -558,9 +558,11 @@ StringMap.prototype.getId = function(input){
/* ------------------------ */
function escapeString(input){
//escape method escapes certain characters that encodeURIComponent cannot process
//unescape is used to make the resulting string smaller
return unescape(encodeURIComponent(escape(input)));
try {
return encodeURIComponent(input);
} catch (ex){
throw new Parse_Error(" unable to encode '" + input.replace(/^!(String|Number|RegExp|Atom|Bool')!/, '') + "'");
}
}
function parseFile(code, file) {