mirror of
https://github.com/elisspace/core.git
synced 2026-10-08 10:08:42 +00:00
9 lines
200 B
Python
9 lines
200 B
Python
""" Helper methods for various modules. """
|
|
|
|
import re
|
|
|
|
def sanitize_filename(filename):
|
|
""" Sanitizes a filename by removing .. / and \\. """
|
|
return re.sub(r"(~|(\.\.)|/|\+)", "", filename)
|
|
|