invalid string escape mask at javascript
Summary
invalid string escape mask at javascriptContent
HI,
I have the following file name (FR-EXP26621341d'Auzac de Lamartinie120120208038504.pdf )
I am using the below function to encode and escaping the characters to calculate the signature.
function sampleFun(filename) {
var encodedRes = encodeURI(filename).replace(/['()]/g, escape).replace(/\*/g, '%2A').replace(/%(?:7C|60|5E)/g, unescape);
return encodedRes
}
but I am getting below Error
"o:errorPath" : "Review JavaScript error(s) and fix them:\nerror: null@30 -> invalid string escape mask\n at: function=createAuthHeader, loc=js/AWSSIGNATURECALCULATION_01.00.0000/awssignature.js, line=30\n",
"o:errorCode" : "JavaScript execution error"
"o:errorCode" : "JavaScript execution error"
but the same function working in Browser.
0