Merge pull request #2144 from MoritzBrueckner/fix-matnames
Replace ' and " characters in asset names
This commit is contained in:
commit
4a784c70a8
|
@ -576,7 +576,7 @@ def safesrc(s):
|
|||
def safestr(s: str) -> str:
|
||||
"""Outputs a string where special characters have been replaced with
|
||||
'_', which can be safely used in file and path names."""
|
||||
for c in r'[]/\;,><&*:%=+@!#^()|?^':
|
||||
for c in r'''[]/\;,><&*:%=+@!#^()|?^'"''':
|
||||
s = s.replace(c, '_')
|
||||
return ''.join([i if ord(i) < 128 else '_' for i in s])
|
||||
|
||||
|
|
Loading…
Reference in a new issue