[rt-devel] attachments

Christian Kurz Christian.Kurz at planNET.de
Mon Jan 22 09:04:22 EST 2001


On 01-01-22 Brandon S. Allbery KF8NH wrote:
> On Monday, January 22, 2001 14:32:06 +0100, Christian Kurz 
> <Christian.Kurz at planNET.de> wrote:
> +-----
> | Hm, and what would be a proper code to still get the URL highlighted as
> | Link but still use print_html to have a protecting against java-script?
> +--->8

> sub print_html{
>     my ($value) = shift;
>     my %map = ('<' => '&lt;', '>' => '&gt;', '&' => '&amp;');
>     $value =~ s/([<>\&])/$map{$1}/ge;
>     $value =~ 
> s!(?:^|\b)((?:https?|ftp|mailto)://[^\s\"\'/]+/[^\s():\"\']+)!<A 
> HREF=\"$1\">$1</A>!g;
>     print "$value";
> }

Thank you very much. It works really good.

Ciao
     Christian
-- 
Christian Kurz                                   http://www.planNET.de
planNET Systems GmbH                            mailto:info at planNET.de
Schoenfeldstr. 8                              Telefon: +49 721 66 36 0
D-76131 Karlsruhe                           Telefax: +49 721 66 36 199 




More information about the Rt-devel mailing list