Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 239772 Details for
Bug 427759
[terminal] Hyperlink detection should be supported
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed patch
hyperlink.patch (text/plain), 2.05 KB, created by
Chris McGee
on 2014-02-09 21:34:26 EST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Chris McGee
Created:
2014-02-09 21:34:26 EST
Size:
2.05 KB
patch
obsolete
>--- ../../../org.eclipse.orion.client.ui/web/terminal/term.js 2014-02-09 20:18:23.007563776 -0500 >+++ term.js 2014-02-09 21:17:44.480017392 -0500 >@@ -1289,6 +1289,41 @@ > if (attr !== this.defAttr) { > out += '</span>'; > } >+ >+ // BEGIN GODEV CUSTOMIZATION >+ >+ // The html spaces and ampersands make it difficult to match URL's with query paramters in it >+ // Pull them out for now and then we will put them back after if there is a hyperlink match >+ out = out.replace(/\ /g, "\t \r\t \r\t \r"); >+ out = out.replace(/\&/g, "&=-&=-&=-"); >+ >+ // Check for hyperlinks (ssh, ftp, telnet, and http(s)) >+ // HTML tags, such as the span tag for the blinking cursor can appear in between any character >+ // This will match a beginning or end tag >+ var tagMatch = "(<[^>]+?>)?"; >+ var protos = ["http", "https", "ftp", "sftp", "telnet"]; // Match http(s), (s)ftp and telnet protocols >+ // An html tag can occur in between any two characters in the protocol (e.g. the cursor span) >+ for (var protoIdx = 0; protoIdx < protos.length; protoIdx++) { >+ protos[protoIdx] = protos[protoIdx].split("").join(tagMatch); >+ } >+ var protoMatch = "((" + protos.join(")|(") + "))"; >+ // Protocol separator >+ var separatorMatch = "://"; >+ separatorMatch = separatorMatch.split("").join(tagMatch); >+ // Match all of the valid characters for the rest of the URL >+ var restMatch = "[a-zA-Z0-9%\\.,:\\/\\?=\\&_\\-\\+#@]"; >+ // The final URL matcher >+ var urlMatch = "(" + protoMatch+tagMatch + separatorMatch+tagMatch + restMatch+"*"+tagMatch + restMatch+"*"+tagMatch + restMatch+"+" + ")"; >+ >+ out = out.replace(new RegExp(urlMatch, "g"), function(match) { >+ return match.replace(match, "<a href=\""+match.replace(new RegExp(tagMatch, "g"), "")+ >+ "\" style=\"color: inherit;\" target=\"_blank\">"+match+"</a>"); >+ }); >+ >+ out = out.replace(/\t \r\t \r\t \r/g, " "); >+ out = out.replace(/\&=-\&=-\&=-/g, "&"); >+ >+ // END GODEV CUSTOMIZATION > > this.children[y].innerHTML = out; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 427759
: 239772