strip_non_ascii in comments-author-name
This commit is contained in:
@@ -601,3 +601,9 @@ def to_valid_filename(name):
|
||||
name = '_' + name
|
||||
|
||||
return name
|
||||
|
||||
|
||||
def strip_non_ascii(string):
|
||||
''' Returns the string without non ASCII characters'''
|
||||
stripped = (c for c in string if 0 < ord(c) < 127)
|
||||
return ''.join(stripped)
|
||||
|
||||
Reference in New Issue
Block a user