Closed Bug 579749 Opened 14 years ago Closed 14 years ago

Linkify the URL found in attachments (restore the is_url behavior) if there is only an URL in them

Categories

(Bugzilla :: Attachments & Requests, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.2

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

Attachments

(1 file)

I removed is_url as part of bug 119703, because there is a cleaner way (I think) to reproduce its behavior. This bug is about restoring it (maybe in a slightly different way).
Any ideas on how you're thinking of doing it? I think a &quoteurls=1 option, used for text/ attachments in the View pane might be a good idea.
No, I don't plan to do it this way (you don't want that for text/html, not text/xml, for instance). I'm going to restore the old behavior. If we want further improvements, then someone will have to file another bug. I have a patch ready, already.
Attached patch patch, v1Splinter Review
It looks similar to what we have in 4.0 and older. It now accepts all protocols listed in SAFE_PROTOCOLS, which is an improvement compared to http, https and ftp which were the only protocols accepted so far.
Attachment #458222 - Flags: review+
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified template/en/default/attachment/edit.html.tmpl
Committed revision 7384.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: approval+
Resolution: --- → FIXED
Summary: Linkify URLs found in attachments (restore the is_url behavior) → Linkify the URL found in attachments (restore the is_url behavior) if there is only an URL in them
Comment on attachment 458222 [details] [diff] [review]
patch, v1

Might be a good idea to just factor out the whole URL regexp into a constant.

Also, if you're just going to do it for text/plain anyway, the quoteUrls method would have worked, wouldn't it?
(In reply to comment #5)
> Also, if you're just going to do it for text/plain anyway, the quoteUrls method
> would have worked, wouldn't it?

Probably, but it needs some more work in attachment.cgi which I didn't want to do right now. :) For now, I just wanted to restore the "is URL" behavior. Feel free to file a separate bug, though. :)
Okay, filed as bug 579892. :-)
You missed updating viewall. I'll file a new bug for that.
(In reply to Reed Loden [:reed] (very busy) from comment #8)
> You missed updating viewall.

I didn't forget. I just don't care enough about viewall to port this feature there.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: