Closed roboshim closed 3 months ago
Hi,
you are right, this is the code for testing:
def quote(s):
# s = s.replace('"', '\\"') # Fails
s = s.replace('\\', '\\\\')
s = s.replace('"', '\\"') # OK
return '"%s"' % s
def test_quote():
assert quote('"') == '"\\""'
assert quote('foo"bar') == '"foo\\"bar"'
if __name__ == '__main__':
test_quote()
print('Test OK!')
Thanks a lot for your patch!
Hello,
I presume the function
quote()
inimaputil.py
is incorrect. Please, see the Issue #174Thank you for merging, if I am correct.
Regards,
Robo.