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 (
45
45
ethAddressRegexString = `^0x[0-9a-fA-F]{40}$`
46
46
ethAddressUpperRegexString = `^0x[0-9A-F]{40}$`
47
47
ethAddressLowerRegexString = `^0x[0-9a-f]{40}$`
48
- uRLEncodedRegexString = `(%[A- Fa-f0-9 ]{2})`
48
+ uRLEncodedRegexString = `^(?:[^%]|%[0-9A- Fa-f ]{2})*$ `
49
49
hTMLEncodedRegexString = `&#[x]?([0-9a-fA-F]{2})|(>)|(<)|(")|(&)+[;]?`
50
50
hTMLRegexString = `<[/]?([a-zA-Z]+).*?>`
51
51
splitParamsRegexString = `'[^']*'|\S+`
Original file line number Diff line number Diff line change @@ -9537,6 +9537,9 @@ func TestURLEncodedValidation(t *testing.T) {
9537
9537
{"a%b" , false },
9538
9538
{"1%2" , false },
9539
9539
{"%%a%%" , false },
9540
+ {"hello" , true },
9541
+ {"" , true },
9542
+ {"+" , true },
9540
9543
}
9541
9544
9542
9545
validate := New ()
You can’t perform that action at this time.
0 commit comments