Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
roomlist
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
roomlist
Commits
93a10002
Commit
93a10002
authored
Jun 16, 2017
by
Daniel W Bond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
began excluding unicode blocks from valid names by removing emojis
parent
4c84b928
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
roomlist/core/utils.py
roomlist/core/utils.py
+12
-1
No files found.
roomlist/core/utils.py
View file @
93a10002
...
...
@@ -82,7 +82,18 @@ def create_email(text_path, html_path, subject, to, context):
def
no_nums
(
name
):
no_numbers
=
re
.
sub
(
'[0-9]'
,
''
,
name
)
emoji_pattern
=
re
.
compile
(
"["
u
"
\U0001F600
-
\U0001F64F
"
# emoticons
u
"
\U0001F300
-
\U0001F5FF
"
# symbols & pictographs
u
"
\U0001F680
-
\U0001F6FF
"
# transport & map symbols
u
"
\U0001F1E0
-
\U0001F1FF
"
# flags (iOS)
# exclude additional unicode blocks as necessary
# https://en.wikipedia.org/wiki/Unicode_block
"]+"
,
flags
=
re
.
UNICODE
)
no_emojis
=
emoji_pattern
.
sub
(
r
''
,
name
)
no_numbers
=
re
.
sub
(
'[0-9]'
,
''
,
no_emojis
)
return
no_numbers
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment