mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-05-31 19:05:28 +00:00
10 lines
156 B
Python
10 lines
156 B
Python
import re
|
|
|
|
|
|
def no_special_chars(s):
|
|
return bool(re.match(r'\w+$', s))
|
|
|
|
|
|
def safe_str(s):
|
|
return s.encode('utf-8', errors='ignore').decode('utf-8')
|