[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdebase/kcontrol/ebrowsing/plugins/shorturi
From:       Dirk Mueller <mueller () kde ! org>
Date:       2006-08-23 9:08:52
Message-ID: 1156324132.812227.18467.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 576149 by mueller:

make the FQDN match a bit more specific


 M  +7 -0      kshorturifilter.cpp  


--- branches/KDE/3.5/kdebase/kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp #576148:576149
@@ -34,6 +34,7 @@
 #include <kprotocolinfo.h>
 #include <kstandarddirs.h>
 #include <kconfig.h>
+#include <kmimetype.h>
 
 #include "kshorturifilter.h"
 
@@ -70,6 +71,12 @@
     if (verbose)
       kdDebug() << "KShortURIFilter::isValidShortURL: " << cmd
                 << " matches FQDN_PATTERN" << endl;
+
+    // stuff like wallpaper.png matches the FQDN_PATTERN but is most
+    // likely not a domain
+    if (KMimeType::findByPath(cmd) != KMimeType::defaultMimeTypePtr()) {
+        return false;
+
     return true;
   }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic