Bug 100820 - html entities in topic instead of actual characters
Summary: html entities in topic instead of actual characters
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-04 16:29 UTC by JPD
Modified: 2010-07-01 16:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JPD 2005-03-04 16:29:05 UTC
Version:           0.16 #2075 (using KDE 3.3.2, Gentoo)
Compiler:          gcc version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)
OS:                Linux (i686) release 2.6.10-gentoo-r6

Around 16:20 UTC+1 2005-03-04 with 2 day old CVS, #javascript's topic displays as:
** The channel topic is "topic JavaScript, JScript, ECMAScript, et al (!= Java) | Do NOT paste in the channel. Pastebot: www.erxz.com/pb/ | Just ASK, and ask publically in the channel. | <http://jsfreenode.homelinux.org/&gt;".

Notice at the end, &gt; instead of > Other channel users assure me that it does indeed end in >
&gt; is the html entity for > and argonel grumbled about qt richtext don't know much more description I can give.
Comment 1 John Tapsell 2005-03-04 16:46:49 UTC
On Friday 04 March 2005 15:29, JPD wrote:
> topic JavaScript, JScript, ECMAScript, et al (!= Java) | Do NOT paste in
> the channel. Pastebot: www.erxz.com/pb/ | Just ASK, and ask publically in
> the channel. | <http://jsfreenode.homelinux.org/&gt;

The bug is because it's interpreting the > as part of the url (which is valid 
- you can have urls with that in it).

Comment 2 John Tapsell 2005-03-04 17:12:46 UTC
CVS commit by johnflux: 

Fix bug 100820, and fix the bug where if you type:  "hello &gt;"  then press up, it will be turned into "hello >"

BUG:100820


  M +1 -1      common.cpp   1.37
  M +1 -1      ircinput.cpp   1.65


--- kdeextragear-2/konversation/konversation/common.cpp  #1.36:1.37
@@ -68,5 +68,5 @@ QString tagURLs(const QString& text, con
   urlLen =0;
 
-  QRegExp urlPattern("((www\\.(?!\\.)|(fish|(f|ht)tp(|s))://)[\\d\\w\\./,\\':~\\?=&;#@\\-\\+\\%\\*\\{\\}]+)|"
+  QRegExp urlPattern("((www\\.(?!\\.)|(fish|(f|ht)tp(|s))://)([\\d\\w\\./,\\':~\\?=;#@\\-\\+\\%\\*\\{\\}]|&amp;)+)|"
       "([-.\\d\\w]+@[-.\\d\\w]{2,}\\.[\\w]{2,})");
   urlPattern.setCaseSensitive(false);

--- kdeextragear-2/konversation/konversation/ircinput.cpp  #1.64:1.65
@@ -34,5 +34,5 @@
 
 #define MAXHISTORY 100
-#define RICHTEXT 1
+#define RICHTEXT 0
 
 IRCInput::IRCInput(QWidget* parent) : KTextEdit(parent)


Comment 3 John Tapsell 2010-07-01 16:00:13 UTC
commit 20b711922c9e761c1d3db91b2a9ce991088b92e9
Author: John Tapsell <john.tapsell@kdemail.net>
Date:   Fri Mar 4 16:12:38 2005 +0000

    Fix bug 100820, and fix the bug where if you type:  "hello &gt;"  then press up, it will be turned into "hello >"
    
    BUG:100820
    
    svn path=/trunk/kdeextragear-2/konversation/; revision=394882

diff --git a/konversation/common.cpp b/konversation/common.cpp
index 81ba888..9257a9a 100644
--- a/konversation/common.cpp
+++ b/konversation/common.cpp
@@ -67,7 +67,7 @@ QString tagURLs(const QString& text, const QString& fromNick)
   pos = 0;
   urlLen =0;
 
-  QRegExp urlPattern("((www\\.(?!\\.)|(fish|(f|ht)tp(|s))://)[\\d\\w\\./,\\':~\\?=&;#@\\-\\+\\%\\*\\{\\}]+)|"
+  QRegExp urlPattern("((www\\.(?!\\.)|(fish|(f|ht)tp(|s))://)([\\d\\w\\./,\\':~\\?=;#@\\-\\+\\%\\*\\{\\}]|&amp;)+)|"
       "([-.\\d\\w]+@[-.\\d\\w]{2,}\\.[\\w]{2,})");
   urlPattern.setCaseSensitive(false);
 
diff --git a/konversation/ircinput.cpp b/konversation/ircinput.cpp
index 8059e70..27f1b21 100644
--- a/konversation/ircinput.cpp
+++ b/konversation/ircinput.cpp
@@ -33,7 +33,7 @@
 #include "ircview.h"
 
 #define MAXHISTORY 100
-#define RICHTEXT 1
+#define RICHTEXT 0
 
 IRCInput::IRCInput(QWidget* parent) : KTextEdit(parent)
 {