diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-05-05 14:09:50 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-05-05 14:09:50 +0200 |
commit | 99c3bed49f6ee0124be79de66a91daaa5f56f735 (patch) | |
tree | 26203e9517d8a38241f2b6bc454fc27d9b499b81 /pyaggr3g470r/models.py | |
parent | Improved forms validation. (diff) | |
download | newspipe-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.py | 2 |
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): """ |