mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Removed use of eval from the tokenizer.
This commit is contained in:
parent
80b04b4d09
commit
3b5825ebe3
@ -184,8 +184,8 @@ class Tokenizer:
|
|||||||
def handleToken(self, token):
|
def handleToken(self, token):
|
||||||
while token and token[0] == '"' and token[-1] == token[0]:
|
while token and token[0] == '"' and token[-1] == token[0]:
|
||||||
if len(token) > 1:
|
if len(token) > 1:
|
||||||
# token = token[1:-1].decode('string-escape') # 2.3+
|
token = token[1:-1].decode('string_escape') # 2.3+
|
||||||
token = eval('"%s"' % token[1:-1], self._env, self._env)
|
# token = eval('"%s"' % token[1:-1], self._env, self._env)
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
return token
|
return token
|
||||||
|
Loading…
Reference in New Issue
Block a user