Ticket #1485789 (closed Patches: fixed)

Opened 18 months ago

Last modified 15 months ago

Wrong link text handling

Reported by: shrek_ogre Owned by:
Priority: 5 Milestone: 0.3-stable
Component: Core functionality Version: 0.2.1
Severity: minor Keywords:
Cc: dave@…

Description

Roundcube 0.2.x has a problem with displaying in message body the strings like file://somewhere/somefile or smb://somewhere/somefile or someproto://somewhere/somefile. Nothing is displayed instead while http://somewhere/somefile or ftp://somewhere/somefileis is displayed like a link. Roundcube 0.1.1 works OK and treats all of this strings like a links.

Attachments

ticket1485789-2.diff (1.0 KB) - added by shrek_ogre 16 months ago.
Patch adding 'file' to list of schemes to rewrite as links and leave unrecognised links "as is".
ticket1485789.diff (1.1 KB) - added by drowe 16 months ago.
Patch adding 'file' to list of schemes to rewrite as links. - Combining my original patch, and shrek_ogre's thinking.

Change History

Changed 18 months ago by shrek_ogre

  • component changed from Other to Core functionality

Changed 18 months ago by alec

  • milestone changed from later to 0.2.2

Changed 16 months ago by drowe

  • cc dave@… added

While adding 'file' is something that could be handled cross-platform (in my experience), handling the multitude of other schemes / protocols doesn't seem feasible. Some are supported natively, others are not.

With an available list of schemes here: http://www.iana.org/assignments/uri-schemes.html It only seams logical to handle the schemes which fall under the majority of use cases for e-mail. Largely, the schemes natively supported by the browser.

Changed 16 months ago by shrek_ogre

Patch adding 'file' to list of schemes to rewrite as links and leave unrecognised links "as is".

Changed 16 months ago by shrek_ogre

Well, I agree with arguments about some certain protocols. Nevertheless, the program should return not recognised links without any modification, not replacing them by ".

Changed 16 months ago by drowe

Ah, I see your point.

Replaced my patch with one similar to yours, but staying in line with the original code (adding to the internal list, etc). Also, without 'priming' $url on every link being processed - since the majority of links processed by this code will fall under the 'http' / 'www.' type, default to those, and handle edge cases specifically, rather than preparing for the edge case every time.

Changed 16 months ago by drowe

Patch adding 'file' to list of schemes to rewrite as links. - Combining my original patch, and shrek_ogre's thinking.

Changed 16 months ago by shrek_ogre

Agree. With this very simple patch the ticket is to be closed. It would be great not to wait till 0.3-stable milestone.

Changed 15 months ago by Lazlo

  • type changed from Bugs to Patches

Changed 15 months ago by thomasb

  • status changed from new to closed
  • resolution set to fixed
  • severity changed from major to minor

Fixed in r2658

Note: See TracTickets for help on using tickets.