35
35
# https://golangexample.com/go-linter-which-checks-for-dangerous-unicode-character-sequences/
36
36
# We use '\u' because it doesn't require a map lookup and is therefore faster
37
37
BIDI_UNICODE = [
38
- "\u202A " , # \N{LEFT-TO-RIGHT EMBEDDING}
39
- "\u202B " , # \N{RIGHT-TO-LEFT EMBEDDING}
40
- "\u202C " , # \N{POP DIRECTIONAL FORMATTING}
41
- "\u202D " , # \N{LEFT-TO-RIGHT OVERRIDE}
42
- "\u202E " , # \N{RIGHT-TO-LEFT OVERRIDE}
38
+ "\u202a " , # \N{LEFT-TO-RIGHT EMBEDDING}
39
+ "\u202b " , # \N{RIGHT-TO-LEFT EMBEDDING}
40
+ "\u202c " , # \N{POP DIRECTIONAL FORMATTING}
41
+ "\u202d " , # \N{LEFT-TO-RIGHT OVERRIDE}
42
+ "\u202e " , # \N{RIGHT-TO-LEFT OVERRIDE}
43
43
"\u2066 " , # \N{LEFT-TO-RIGHT ISOLATE}
44
44
"\u2067 " , # \N{RIGHT-TO-LEFT ISOLATE}
45
45
"\u2068 " , # \N{FIRST STRONG ISOLATE}
46
46
"\u2069 " , # \N{POP DIRECTIONAL ISOLATE}
47
47
# The following was part of PEP 672:
48
48
# https://www.python.org/dev/peps/pep-0672/
49
49
# so the list above might not be complete
50
- "\u200F " , # \n{RIGHT-TO-LEFT MARK}
50
+ "\u200f " , # \n{RIGHT-TO-LEFT MARK}
51
51
# We don't use
52
52
# "\u200E" # \n{LEFT-TO-RIGHT MARK}
53
53
# as this is the default for latin files and can't be used
@@ -100,7 +100,7 @@ def human_code(self) -> str:
100
100
),
101
101
_BadChar (
102
102
"sub" ,
103
- "\x1A " ,
103
+ "\x1a " ,
104
104
"\\ x1A" ,
105
105
"E2512" ,
106
106
(
@@ -110,7 +110,7 @@ def human_code(self) -> str:
110
110
),
111
111
_BadChar (
112
112
"esc" ,
113
- "\x1B " ,
113
+ "\x1b " ,
114
114
"\\ x1B" ,
115
115
"E2513" ,
116
116
(
@@ -129,7 +129,7 @@ def human_code(self) -> str:
129
129
# Zero Width with Space. At the time of writing not accepted by Python.
130
130
# But used in Trojan Source Examples, so still included and tested for.
131
131
"zero-width-space" ,
132
- "\u200B " , # \n{ZERO WIDTH SPACE}
132
+ "\u200b " , # \n{ZERO WIDTH SPACE}
133
133
"\\ u200B" ,
134
134
"E2515" ,
135
135
"Invisible space character could hide real code execution." ,
0 commit comments