mirror of
https://github.com/markqvist/NomadNet.git
synced 2026-12-05 06:10:02 -05:00
Improved string sanitization, added dynamic timeout calculations, improved state persistence, fixed .allowed not being respected for downloadable files, by Zenith
This commit is contained in:
parent
3eb410afdd
commit
54491d8f2b
14 changed files with 139 additions and 99 deletions
|
|
@ -121,8 +121,9 @@ def strip_modifiers(text):
|
|||
stripped = re.sub(r'[\U0001F3FB-\U0001F3FF]', '', stripped, flags=re.UNICODE)
|
||||
stripped = re.sub(r'[\u200D\u200C]', '', stripped)
|
||||
stripped = re.sub(r'\r\n?', '\n', stripped)
|
||||
|
||||
return stripped.strip().replace("\x00", "")
|
||||
stripped = STRIP_CONTROL_RE.sub('', stripped)
|
||||
|
||||
return stripped.strip()
|
||||
|
||||
def sanitize_name(name):
|
||||
if name is None: return None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue