aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/models.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-05-05 14:09:50 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-05-05 14:09:50 +0200
commit99c3bed49f6ee0124be79de66a91daaa5f56f735 (patch)
tree26203e9517d8a38241f2b6bc454fc27d9b499b81 /pyaggr3g470r/models.py
parentImproved forms validation. (diff)
downloadnewspipe-99c3bed49f6ee0124be79de66a91daaa5f56f735.tar.gz
newspipe-99c3bed49f6ee0124be79de66a91daaa5f56f735.tar.bz2
newspipe-99c3bed49f6ee0124be79de66a91daaa5f56f735.zip
Improved make_valid_nickname function.
Diffstat (limited to 'pyaggr3g470r/models.py')
-rw-r--r--pyaggr3g470r/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pyaggr3g470r/models.py b/pyaggr3g470r/models.py
index dcbe221c..9770ed77 100644
--- a/pyaggr3g470r/models.py
+++ b/pyaggr3g470r/models.py
@@ -51,7 +51,7 @@ class User(db.Model, UserMixin):
@staticmethod
def make_valid_nickname(nickname):
- return re.sub('[^a-zA-Z0-9_\.\-]', '', nickname)
+ return re.sub(ur'[^\w]', '', nickname, flags=re.U)
def get_id(self):
"""
bgstack15