QTfrontend/ui/widget/chatwidget.cpp
changeset 9979 710e0f92c2ab
parent 9728 320f89e0b28c
child 9998 736015b847e3
--- a/QTfrontend/ui/widget/chatwidget.cpp	Sun Jan 12 16:21:57 2014 +0400
+++ b/QTfrontend/ui/widget/chatwidget.cpp	Mon Jan 13 19:34:39 2014 +0100
@@ -544,7 +544,8 @@
     QString hlRegExp("^(.* )?%1[^-a-z0-9_]*( .*)?$");
     QRegExp whitespace("\\s");
 
-    m_highlights.append(QRegExp(hlRegExp.arg(m_userNick.toLower())));
+    if (!m_userNick.isEmpty())
+        m_highlights.append(QRegExp(hlRegExp.arg(QRegExp::escape(m_userNick.toLower()))));
 
     QFile file(cfgdir->absolutePath() + "/" + m_userNick.toLower() + "_highlight.txt");