Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/components/Linkifier.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js |
| index 439eefdb3027728d4f6672b172ba6263033e54c6..9aa7b627866a513a427ae5cc596e0730bdf8d1aa 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js |
| @@ -513,12 +513,17 @@ WebInspector.linkifyURLAsNode = function(url, linkText, classes, isExternal, too |
| if (!linkText) |
| linkText = url; |
| classes = (classes ? classes + " " : ""); |
|
caseq
2016/03/17 00:28:39
please move this down to conditional where we modi
dgozman
2016/03/18 19:06:47
Done.
|
| - classes += isExternal ? "webkit-html-external-link" : "webkit-html-resource-link"; |
| var a = createElement("a"); |
| - var href = sanitizeHref(url); |
| - if (href !== null) |
| + var href = url; |
| + if (url.trim().toLowerCase().startsWith("javascript:")) |
| + href = null; |
| + if (isExternal && WebInspector.ParsedURL.isRelativeURL(url)) |
| + href = null; |
| + if (href !== null) { |
| a.href = href; |
| + classes += isExternal ? "webkit-html-external-link" : "webkit-html-resource-link"; |
| + } |
| a.className = classes; |
| if (!tooltipText && linkText !== url) |
| a.title = url; |