mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
disallow \r and \n in media filenames
This commit is contained in:
parent
980c9d7305
commit
de8adfecff
1 changed files with 1 additions and 1 deletions
|
@ -340,7 +340,7 @@ class MediaManager(object):
|
||||||
# Illegal characters
|
# Illegal characters
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
_illegalCharReg = re.compile(r'[][><:"/?*^\\|\0]')
|
_illegalCharReg = re.compile(r'[][><:"/?*^\\|\0\r\n]')
|
||||||
|
|
||||||
def stripIllegal(self, str):
|
def stripIllegal(self, str):
|
||||||
return re.sub(self._illegalCharReg, "", str)
|
return re.sub(self._illegalCharReg, "", str)
|
||||||
|
|
Loading…
Reference in a new issue