(input)
| 51524 | } |
| 51525 | position.position = idx; |
| 51526 | return input.slice(start, position.position); |
| 51527 | } |
| 51528 | function stringPercentDecode(input) { |
| 51529 | const bytes = encoder.encode(input); |
| 51530 | return percentDecode(bytes); |
| 51531 | } |
| 51532 | function percentDecode(input) { |
| 51533 | const output = []; |
| 51534 | for (let i3 = 0; i3 < input.length; i3++) { |
| 51535 | const byte = input[i3]; |
| 51536 | if (byte !== 37) { |
| 51537 | output.push(byte); |
| 51538 | } else if (byte === 37 && !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i3 + 1], input[i3 + 2]))) { |
| 51539 | output.push(37); |
| 51540 | } else { |
| 51541 | const nextTwoBytes = String.fromCharCode(input[i3 + 1], input[i3 + 2]); |
| 51542 | const bytePoint = Number.parseInt(nextTwoBytes, 16); |
| 51543 | output.push(bytePoint); |
| 51544 | i3 += 2; |
| 51545 | } |
no test coverage detected
searching dependent graphs…