Bug 240366 - Adjust URL-Heuristic for wolphramalpha urls
Summary: Adjust URL-Heuristic for wolphramalpha urls
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: 1.2.3
Platform: Unlisted Binaries Linux
: NOR minor
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 17:12 UTC by Johannes E. Krause
Modified: 2010-07-16 21:59 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 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+),$");