Bug 161648 - Web Inspector: Avoid linkifying some schemes in console logs
Summary: Web Inspector: Avoid linkifying some schemes in console logs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-09-06 15:22 PDT by Joseph Pecoraro
Modified: 2016-09-06 18:01 PDT (History)
7 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (2.81 KB, patch)
2016-09-06 15:23 PDT, Joseph Pecoraro
bburg: review+
bburg: commit-queue-
Details | Formatted Diff | Diff
[PATCH] For Landing (2.80 KB, patch)
2016-09-06 17:02 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2016-09-06 15:22:13 PDT
Summary:
Avoid linkifying some schemes in console logs.

Steps to Reproduce:
1. Inspect this page
2. js> console.log("javascript://alert(1)")
  => This becomes a link. This is not useful inside Web Inspector

Notes:
- Even if a javascript: link is clicked, we should make sure it doesn't do anything.
Comment 1 Joseph Pecoraro 2016-09-06 15:22:27 PDT
<rdar://problem/16413270>
Comment 2 Joseph Pecoraro 2016-09-06 15:23:37 PDT
Created attachment 288053 [details]
[PATCH] Proposed Fix
Comment 3 Brian Burg 2016-09-06 15:41:37 PDT
Comment on attachment 288053 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=288053&action=review

r=me (please fix typo)

> Source/WebInspectorUI/UserInterface/Base/Main.js:2233
> +        if (linkString.startsWith("data:") || linkString.startsWith("javascript:") || linkString.startsWith("mailto")) {

This should be mailto:
Comment 4 Joseph Pecoraro 2016-09-06 17:02:59 PDT
Created attachment 288067 [details]
[PATCH] For Landing
Comment 5 WebKit Commit Bot 2016-09-06 17:33:54 PDT
Comment on attachment 288067 [details]
[PATCH] For Landing

Clearing flags on attachment: 288067

Committed r205529: <http://trac.webkit.org/changeset/205529>