Bug 156433 - [navigation] Wrong hyperlink detection
Summary: [navigation] Wrong hyperlink detection
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux-GTK
: P3 trivial (vote)
Target Milestone: 3.3 M2   Edit
Assignee: Benjamin Muskalla CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-09-06 16:27 EDT by Benjamin Muskalla CLA
Modified: 2006-09-07 10:57 EDT (History)
2 users (show)

See Also:


Attachments
improved_hyperlink_detection (881 bytes, patch)
2006-09-06 17:22 EDT, Benjamin Muskalla CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2006-09-06 16:27:55 EDT
Create a new element with a content like that:

<?xml version="1.0" encoding="UTF-8"?>
<foo>
	<url>http://www.eclipse.org</url>
</foo>

Hold Ctrl and try to click on the URI. You see, the endtag is included in the link which isn't correct :) Hyperlink detection should stop with the < char.
Comment 1 Benjamin Pasero CLA 2006-09-06 16:37:00 EDT
Reproducable with Build id: M20060629-1905 on Windows.

Ben
Comment 2 Benjamin Muskalla CLA 2006-09-06 16:40:40 EDT
Sorry for the trouble guys. Bug is for Platform/Text. Bug occurs not only in the XML editor but in all text editors.
Comment 3 Benjamin Muskalla CLA 2006-09-06 17:22:32 EDT
Created attachment 49552 [details]
improved_hyperlink_detection

This patch only covers this special case. As the detection rules are a bit too simple, I suggest to improve the whole detection function. See http://www.faqs.org/rfcs/rfc1738.html for more details. On the other side, I don't think we should cover all special cases for URI detection. Only some, like this one, are worth to fix because it's very annoying when editing xml files.
Comment 4 Amy Wu CLA 2006-09-06 20:13:05 EDT
Reassigning to Platform Text Inbox since issue seems to be with org.eclipse.jface.text.hyperlink.URLHyperlinkDetector
Comment 5 Dani Megert CLA 2006-09-07 07:06:08 EDT
Thanks for the patch.

Fixed in HEAD.
Available in builds > N20060906-0010.
Comment 6 Dani Megert CLA 2006-09-07 10:57:04 EDT
Reopening to reassign.
Comment 7 Dani Megert CLA 2006-09-07 10:57:57 EDT
.