Helpviewer/HelpBrowserWV.py

changeset 757
d3daf1d8f058
parent 748
eb7e73107d27
child 791
9ec2ac20e54e
--- a/Helpviewer/HelpBrowserWV.py	Sat Dec 18 18:11:02 2010 +0100
+++ b/Helpviewer/HelpBrowserWV.py	Sun Dec 19 13:20:52 2010 +0100
@@ -175,6 +175,11 @@
         self.__lastRequest = request
         self.__lastRequestType = type_
         
+        scheme = request.url().scheme()
+        if scheme == "mailto":
+            QDesktopServices.openUrl(request.url())
+            return False
+        
         if type_ == QWebPage.NavigationTypeFormResubmitted:
             res = E5MessageBox.yesNo(self.view(),
                 self.trUtf8("Resending POST request"),
@@ -575,10 +580,9 @@
                     """ for URL <b>{0}</b>.</p>""").format(name.toString()))
             return
         elif name.scheme() == "javascript":
-            scriptSource = name.toString()[11:]
-            res = self.page().mainFrame().evaluateJavaScript(scriptSource)
-            if res:
-                self.setHtml(res)
+            scriptSource = QUrl.fromPercentEncoding(name.toString(
+                QUrl.FormattingOptions(QUrl.TolerantMode | QUrl.RemoveScheme)))
+            self.page().mainFrame().evaluateJavaScript(scriptSource)
             return
         else:
             if name.toString().endswith(".pdf") or \

eric ide

mercurial