Filter chars under \x20
This commit is contained in:
parent
6e7abd7406
commit
e5bf232253
@ -336,7 +336,7 @@ def ConvertToFile(filename_or_file, *args, **kwargs):
|
|||||||
|
|
||||||
def FilterBadChars(f):
|
def FilterBadChars(f):
|
||||||
s = f.read()
|
s = f.read()
|
||||||
s = re.sub('[\\x00-\\x19]', '\ufffd', s)
|
s = re.sub('[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]', '\ufffd', s)
|
||||||
return io.StringIO(s)
|
return io.StringIO(s)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user