diff --git a/iron-query-params.html b/iron-query-params.html index 635f5d7..fe0e704 100644 --- a/iron-query-params.html +++ b/iron-query-params.html @@ -89,8 +89,14 @@ for (var i = 0; i < paramList.length; i++) { var param = paramList[i].split('='); if (param[0]) { - params[decodeURIComponent(param[0])] = - decodeURIComponent(param[1] || ''); + let key, value; + try { + key = param[0].replace(/%([^\d].)/, "%25$1"); + value = param[1].replace(/%([^\d].)/, "%25$1"); + params[decodeURIComponent(key)] = decodeURIComponent(value || ''); + } catch (e) { + // console.log(e.message); + } } } return params;