Decode Url Safe

decodeUrlComponent may throw error

decodeURIComponent("%C4%97%");

// VM158:1 Uncaught URIError: URI malformed
//     at decodeURIComponent (<anonymous>)
//    at <anonymous>:1:1

Solution:

try {
  decodeURIComponent('%C4%97%')
}
catch(){

}