Title: [205529] trunk/Source
Revision
205529
Author
[email protected]
Date
2016-09-06 17:31:55 -0700 (Tue, 06 Sep 2016)

Log Message

Web Inspector: Avoid linkifying some schemes in console logs
https://bugs.webkit.org/show_bug.cgi?id=161648
<rdar://problem/16413270>

Patch by Joseph Pecoraro <[email protected]> on 2016-09-06
Reviewed by Brian Burg.

Source/WebCore:

* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::openInNewTab):
If a _javascript_: link is passed just ignore it.

Source/WebInspectorUI:

* UserInterface/Base/Main.js:
Don't linkify some kinds of links.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (205528 => 205529)


--- trunk/Source/WebCore/ChangeLog	2016-09-07 00:29:19 UTC (rev 205528)
+++ trunk/Source/WebCore/ChangeLog	2016-09-07 00:31:55 UTC (rev 205529)
@@ -1,3 +1,15 @@
+2016-09-06  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Avoid linkifying some schemes in console logs
+        https://bugs.webkit.org/show_bug.cgi?id=161648
+        <rdar://problem/16413270>
+
+        Reviewed by Brian Burg.
+
+        * inspector/InspectorFrontendHost.cpp:
+        (WebCore::InspectorFrontendHost::openInNewTab):
+        If a _javascript_: link is passed just ignore it.
+
 2016-09-06  Alex Christensen  <[email protected]>
 
         Fix query-only and fragment-only relative URLs when using URLParser

Modified: trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp (205528 => 205529)


--- trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp	2016-09-07 00:29:19 UTC (rev 205528)
+++ trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp	2016-09-07 00:31:55 UTC (rev 205529)
@@ -288,6 +288,9 @@
 
 void InspectorFrontendHost::openInNewTab(const String& url)
 {
+    if (WebCore::protocolIsJavaScript(url))
+        return;
+
     if (m_client)
         m_client->openInNewTab(url);
 }

Modified: trunk/Source/WebInspectorUI/ChangeLog (205528 => 205529)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-09-07 00:29:19 UTC (rev 205528)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-09-07 00:31:55 UTC (rev 205529)
@@ -1,3 +1,14 @@
+2016-09-06  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Avoid linkifying some schemes in console logs
+        https://bugs.webkit.org/show_bug.cgi?id=161648
+        <rdar://problem/16413270>
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Base/Main.js:
+        Don't linkify some kinds of links.
+
 2016-09-06  Devin Rousso  <[email protected]>
 
         Web Inspector: Allow hiding of CSS variables in Computed styles panel

Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (205528 => 205529)


--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2016-09-07 00:29:19 UTC (rev 205528)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2016-09-07 00:31:55 UTC (rev 205529)
@@ -2230,6 +2230,12 @@
         var nonLink = string.substring(0, linkIndex);
         container.append(nonLink);
 
+        if (linkString.startsWith("data:") || linkString.startsWith("_javascript_:") || linkString.startsWith("mailto:")) {
+            container.append(linkString);
+            string = string.substring(linkIndex + linkString.length, string.length);
+            continue;
+        }
+
         var title = linkString;
         var realURL = linkString.startsWith("www.") ? "http://" + linkString : linkString;
         var lineColumnMatch = lineColumnRegEx.exec(realURL);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to