[rt-users] HowTo get URLs to auto-generate links in Ticket/Display?
Matt England
mengland at mengland.net
Sun Aug 21 20:24:21 EDT 2005
At 7/26/2005 08:35 AM, Toby Darling wrote:
>Matt England wrote:
>>*** Still Hunting (Third Request) ***
>>I'm still looking for a way to auto-general URL links in the web page for
>>Ticket/Display (and SelfService).
>
>Is http://wiki.bestpractical.com/index.cgi?ClickableLinks what you're
>looking for? The callback method works in RT 3.4.1.
Ok, the second 2nd suggestion at the above link works well for my RT 3.4.2
system, except that I had to remove the 6th line such that it looks like:
<%init>
my $val = $$content;
use bytes;
$val =~ s/https?:([\w\/\@\-~%#?=;,.:+]|\&)+[\w\/]/<a href="$&"
target="_blank">$&<\/a>/gi;
$val =~ s/(s?ftp|ftps):[\w\/\.:+\-]+/<a href="$&">$&<\/a>/gi;
href="mailto:$2">$&<\/a>/ gi;
$val =~ s/\<((url:\s*)?\w+:[^&<>]+)\>/<<a href="$1"
target="_blank">$1<\/a>>/gi;
$$content = $val;
</%init>
<%args>
$content => undef
</%args>
My system had problems with the 6th line (my system complained about syntax
issues), so I just deleted it; I'm not worried about lack of mailto: links
for now.
I'm making a reference in the above wiki page to this end...but I'm not
sure how to correct it.
-Matt
More information about the rt-users
mailing list