diff --git a/src/sys/es/fan/Uri.js b/src/sys/es/fan/Uri.js index a2f7cfe84..11a4474c3 100644 --- a/src/sys/es/fan/Uri.js +++ b/src/sys/es/fan/Uri.js @@ -113,7 +113,7 @@ class Uri extends Obj { const len = str.length; for (let i=0; i= Uri.__charMap.length || (Uri.__charMap[c] & section) == 0) + if (c >= Uri.__charMap().length || (Uri.__charMap()[c] & section) == 0) throw ParseErr.make("Invalid char in " + Uri.__toSection(section) + " at index " + (this.dpos-1)); // return character as is @@ -1309,7 +1402,7 @@ class UriEncoder { c = s.charCodeAt(i); // unreserved character - const charMap = Uri.__charMap; + const charMap = Uri.__charMap(); if (c < 128 && (charMap[c] & section) != 0 && prev != 92) { this.buf += String.fromCharCode(c); continue;