Closed
Bug 414579
Opened 18 years ago
Closed 18 years ago
URLs with trailing hyphens are improperly linkified
Categories
(Thunderbird :: Mail Window Front End, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: matt, Unassigned)
References
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: 2.0.0.9 (20071031)
When the message view pane linkifies a URL with a trailing hyphen, the hyphen is dropped from the link.
Reproducible: Always
Steps to Reproduce:
1. Email yourself a URL with a trailing hyphen, e.g. http://services.alphaworks.ibm.com/manyeyes/topichub/mAgULsOtha6XjlWjAQlL2-
2. View the email in Thunderbird
3. Click on the link in Thunderbird.
Actual Results:
The hyphen is dropped from the URL that is passed to the browser, resulting in a 404.
Expected Results:
Constructed a link that included the entire URL. Hyphens are a valid character in URLs as per RFC 2396.
There's a bit of ambiguity here, as RFC 2396 says that hyphens should be ignored when followed by whitespace in a URL (since some typesetters [i.e. email clients] may introduce hyphens when autobreaking a line). However, it then says that you should ignore hyphens when immediately followed by a *line break*. I'd say that if you have a URL, with a trailing hyphen, followed by non-breaking whitespace, followed by non-whitespace characters, you can safely assume that the hyphen was not introduced due to text-wrapping.
Comment 1•18 years ago
|
||
For reference, from the rfc:
In some cases, extra whitespace (spaces, linebreaks, tabs, etc.) may
need to be added to break long URI across lines. The whitespace
should be ignored when extracting the URI.
No whitespace should be introduced after a hyphen ("-") character.
Because some typesetters and printers may (erroneously) introduce a
hyphen at the end of line when breaking a line, the interpreter of a
URI containing a line break immediately after a hyphen should ignore
all unescaped whitespace around the line break, and should be aware
that the hyphen may or may not actually be part of the URI.
Comment 2•18 years ago
|
||
> Hyphens are a valid character in URLs as per RFC 2396.
This is not a sufficient argument to include them. This is a *recognizer*, it is fuzzy by nature and cannot recognize everything that is allowed. For example, dots in URLs are also allowed, but they should not be included in cases like "Please go to http://www.yahoo.com. Click on Mail.".
Dashes are similar delimiters in natural languages and thus are treated like dots in the recognizer.
WONTFIX
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → WONTFIX
Comment 3•18 years ago
|
||
s/dashes/hyphens/
Comment 4•18 years ago
|
||
Workarounds:
- Avoid strange characters at the end of your URLs
- Put <> around your URL, as suggested by RFC2396. This will make the ends of the URL unambiguous to the recognizer. Read in Thunderbird (not Bugzilla web interface):
<http://services.alphaworks.ibm.com/manyeyes/topichub/mAgULsOtha6XjlWjAQlL2->.
You need to log in
before you can comment on or make changes to this bug.
Description
•