File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ const (
4545 ethAddressRegexString = `^0x[0-9a-fA-F]{40}$`
4646 ethAddressUpperRegexString = `^0x[0-9A-F]{40}$`
4747 ethAddressLowerRegexString = `^0x[0-9a-f]{40}$`
48- uRLEncodedRegexString = `(%[A- Fa-f0-9 ]{2})`
48+ uRLEncodedRegexString = `^(?:[^%]|%[0-9A- Fa-f ]{2})*$ `
4949 hTMLEncodedRegexString = `&#[x]?([0-9a-fA-F]{2})|(>)|(<)|(")|(&)+[;]?`
5050 hTMLRegexString = `<[/]?([a-zA-Z]+).*?>`
5151 splitParamsRegexString = `'[^']*'|\S+`
Original file line number Diff line number Diff line change @@ -9537,6 +9537,9 @@ func TestURLEncodedValidation(t *testing.T) {
95379537 {"a%b" , false },
95389538 {"1%2" , false },
95399539 {"%%a%%" , false },
9540+ {"hello" , true },
9541+ {"" , true },
9542+ {"+" , true },
95409543 }
95419544
95429545 validate := New ()
You can’t perform that action at this time.
0 commit comments