Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 229014

Summary: URL Links in Task editor include parens and other punctuation
Product: z_Archived Reporter: Nick Boldt <nboldt>
Component: MylynAssignee: Frank Becker <eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: eclipse, robert.elves, steffen.pingel
Version: unspecifiedKeywords: helpwanted
Target Milestone: 3.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 146964    
Bug Blocks: 176212    
Attachments:
Description Flags
patch
none
mylyn/context/zip
none
updated patch
none
mylyn/context/zip
none
updateed patch
none
mylyn/context/zip none

Description Nick Boldt CLA 2008-04-27 15:09:19 EDT
Steps to reproduce:

Open this bug in Mylyn's Bugzilla task editor. Or, create a new local task and paste them in there.

Note the following URLs, and how they open in a browser (or what chunk of text, onmouseover, becomes a link):

http://eclipse.org   -- good
(http://eclipse.org) -- bad
[http://eclipse.org] -- bad
{http://eclipse.org} -- bad
"http://eclipse.org" -- bad
'http://eclipse.org' -- bad
http://eclipse.org.  -- bad
http://eclipse.org,  -- bad

It's not as big a deal when it's at the end of a long URL's querystring. But when there's trailing punctuation on a domain name, folder, or page, you get a 404 or invalid domain.

Given that no URL ought to end with a period or comma (I'm guessing), and that if there's an opening bracket or quote there will be a closing one which can be omitted from the link, these seem like reasonable usecases.
Comment 1 Frank Becker CLA 2008-05-22 11:38:01 EDT
Created attachment 101535 [details]
patch

This patch fix all the cases in the example.
Comment 2 Frank Becker CLA 2008-05-22 11:38:05 EDT
Created attachment 101536 [details]
mylyn/context/zip
Comment 3 Frank Becker CLA 2008-05-22 16:47:21 EDT
Created attachment 101626 [details]
updated patch

this patch include code with correted RepositoryTextScanner implementation.

So now the coloring for bugs and url is based on findHyperlinks and now longe on SingleLineRule.
Comment 4 Frank Becker CLA 2008-05-22 16:47:26 EDT
Created attachment 101629 [details]
mylyn/context/zip
Comment 5 Frank Becker CLA 2008-06-06 16:24:23 EDT
Created attachment 104046 [details]
updateed patch
Comment 6 Frank Becker CLA 2008-06-06 16:25:25 EDT
Created attachment 104047 [details]
mylyn/context/zip
Comment 7 Steffen Pingel CLA 2008-06-10 00:34:00 EDT
Great stuff Frank! I have applied your modifications of TaskUrlHyperlinkDetector. 

I would like to consider the remaining part of the patch as part of bug 167941. The modification of the rule parser has a risk of introducing a performance regression and we won't be able to do sufficient testing for that in the 3.0 release cycle.