We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db09d86 commit 17f77a0Copy full SHA for 17f77a0
lib/internals/querystring.js
@@ -71,6 +71,13 @@ function encodeString(str) {
71
// Surrogate pair
72
++i;
73
74
+ // This branch should never happen because all URLSearchParams entries
75
+ // should already be converted to USVString. But, included for
76
+ // completion's sake anyway.
77
+ if (i >= len) {
78
+ throw new Error("URI malformed");
79
+ }
80
+
81
const c2 = str.charCodeAt(i) & 0x3FF;
82
83
lastPos = i + 1;
0 commit comments