Escaped additional punctuation

This commit is contained in:
Matt Lowe 2015-06-24 13:08:38 +02:00
parent d76073cdd1
commit 23b163341e

View file

@ -137,7 +137,7 @@ bool Servatrice_DatabaseInterface::usernameIsValid(const QString &user)
regEx.append("A-Z"); regEx.append("A-Z");
if(settingsCache->value("users/allownumerics", true).toBool()) if(settingsCache->value("users/allownumerics", true).toBool())
regEx.append("0-9"); regEx.append("0-9");
regEx.append(allowedPunctuation); regEx.append(QRegExp::escape(allowedPunctuation));
regEx.append("]+"); regEx.append("]+");
static QRegExp re = QRegExp(regEx); static QRegExp re = QRegExp(regEx);