Bug 240366

Summary: Adjust URL-Heuristic for wolphramalpha urls
Product: [Applications] konversation Reporter: Johannes E. Krause <j.k>
Component: generalAssignee: Konversation Developers <konversation-devel>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version First Reported In: 1.2.3   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Johannes E. Krause 2010-06-01 17:12:31 UTC
URLs like this have become more and more common in the recent past, and the current URL heuristic doesn't catch them completely.

Example: http://www.wolframalpha.com/input/?i=Plot3D[1%2Bx%2By%2B%28x%2By%29^2+%2B%28x%2By%29^3+%2B%28x%2By%29^4%2C+{x%2C+-0.5%2C+0.5}%2C+{y%2C+-0.5%2C+0.5}]
Comment 1 Peter Simonsson 2010-07-16 21:59:49 UTC
commit 6b7e7ddb5ea24d6654f99701c4823b18abe3ea70
Author: Peter Simonsson <peter.simonsson@gmail.com>
Date:   Fri Jul 16 21:59:23 2010 +0200

    Fix wolframalpha urls.
    BUG:240366

diff --git a/src/common.cpp b/src/common.cpp
index 5785f6f..a103c6e 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -27,7 +27,7 @@ namespace Konversation
 {
 
     static QRegExp colorRegExp("((\003([0-9]|0[0-9]|1[0-5])(,([0-9]|0[0-9]|1[0-5])|)|\017)|\x02|\x09|\x13|\x16|\x1f)");
-    static QRegExp urlPattern("((www\\.(?!\\.)|(fish|irc|amarok|(f|sf|ht)tp(|s))://)(\\.?[\\d\\w/,\\':~\\?=;#@\\-\\+\\%\\*\\{\\}\\!\\(\\)\\[\\]]|&)+)|"
+    static QRegExp urlPattern("((www\\.(?!\\.)|(fish|irc|amarok|(f|sf|ht)tp(|s))://)(\\.?[\\d\\w/,\\':~\\?=;#@\\-\\+\\%\\*\\{\\}\\!\\(\\)\\[\\]\\^]|&)+)|"
         "([-.\\d\\w]+@[-.\\d\\w]{2,}\\.[\\w]{2,})");
     static QRegExp tdlPattern("(.*)\\.(\\w+),$");