| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1be6956 commit 1bf5d1a
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,13 +94,13 @@ function unescapeBuffer(s, decodeSpaces) { | |||
| 94 | 94 | hexHigh = unhexTable[currentChar]; | |
| 95 | 95 | if (!(hexHigh >= 0)) { | |
| 96 | 96 | out[outIndex++] = 37; // '%' | |
| 97 | + continue; | ||
| 97 | 98 | } else { | |
| 98 | 99 | nextChar = s.charCodeAt(++index); | |
| 99 | 100 | hexLow = unhexTable[nextChar]; | |
| 100 | 101 | if (!(hexLow >= 0)) { | |
| 101 | 102 | out[outIndex++] = 37; // '%' | |
| 102 | - out[outIndex++] = currentChar; | ||
| 103 | - currentChar = nextChar; | ||
| 103 | + index--; | ||
| 104 | 104 | } else { | |
| 105 | 105 | hasHex = true; | |
| 106 | 106 | currentChar = hexHigh * 16 + hexLow; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -175,7 +175,10 @@ const qsUnescapeTestCases = [ | |||
| 175 | 175 | ['there%2Qare%0-fake%escaped values in%%%%this%9Hstring', | |
| 176 | 176 | 'there%2Qare%0-fake%escaped values in%%%%this%9Hstring'], | |
| 177 | 177 | ['%20%21%22%23%24%25%26%27%28%29%2A%2B%2C%2D%2E%2F%30%31%32%33%34%35%36%37', | |
| 178 | - ' !"#$%&\'()*+,-./01234567'] | ||
| 178 | + ' !"#$%&\'()*+,-./01234567'], | ||
| 179 | + ['%%2a', '%*'], | ||
| 180 | + ['%2sf%2a', '%2sf*'], | ||
| 181 | + ['%2%2af%2a', '%2*f*'] | ||
| 179 | 182 | ]; | |
| 180 | 183 | ||
| 181 | 184 | assert.strictEqual(qs.parse('id=918854443121279438895193').id, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments