[Konversation-devel] [Bug 97350] color in channel name has strange effects
ismail donmez ( cartman )
ismail at kde.org
Thu Jul 1 15:56:22 CEST 2010
https://bugs.kde.org/show_bug.cgi?id=97350
--- Comment #2 from ismail ( cartman ) donmez <ismail kde org> 2010-07-01 15:56:21 ---
commit 33b55cd4ac0d70bf4c40c5558e2d69271ba26b5f
Author: İsmail Dönmez <ismail at kde.org>
Date: Tue Jan 18 18:12:59 2005 +0000
Escape colors in #channel. Damned mirc lamers! Regexp by JohnFlux(thanks!)
edited slightly by me.
BUG:97350
svn path=/trunk/kdeextragear-2/konversation/; revision=379849
diff --git a/konversation/common.cpp b/konversation/common.cpp
index 3dcda73..15ac500 100644
--- a/konversation/common.cpp
+++ b/konversation/common.cpp
@@ -48,7 +48,14 @@ QString tagURLs(const QString& text, const QString&
fromNick)
);
channelPattern.setCaseSensitive(false);
-
+
+ // See http://bugs.kde.org/show_bug.cgi?id=97350
+ QRegExp colorRegex=QRegExp("#<font color=\"#\\S+\">(.*)</font>");
+ colorRegex.setMinimal(true);
+ colorRegex.setCaseSensitive(false);
+ colorRegex.search(filteredLine);
+ filteredLine.replace(colorRegex,"#"+colorRegex.cap(1));
+
while(channelPattern.search(filteredLine, pos) != -1) {
// Remember where we found the url
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Konversation-devel
mailing list