From 4fe8601753fd58f54a460b84239babc7642b5350 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Tue, 27 Apr 2004 06:10:09 +0000 Subject: [PATCH] Bug 210247 URLs followed by close parens get hyperlinked incorrectly r=kiko --- webtools/lxr/lib/LXR/Common.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webtools/lxr/lib/LXR/Common.pm b/webtools/lxr/lib/LXR/Common.pm index 45b529a93e5e..49a0073b3418 100755 --- a/webtools/lxr/lib/LXR/Common.pm +++ b/webtools/lxr/lib/LXR/Common.pm @@ -1,4 +1,4 @@ -# $Id: Common.pm,v 1.24 2004/02/19 06:53:22 timeless%mozdev.org Exp $ +# $Id: Common.pm,v 1.25 2004/04/27 06:10:09 timeless%mozdev.org Exp $ package LXR::Common; @@ -154,8 +154,9 @@ sub htmlquote { sub freetextmarkup { - $_[0] =~ s#((ftp|http)://\S*[^\s.])#$1#g; - $_[0] =~ s/(<(.*@.*)>)/$1<\/a>/g; + $_[0] =~ s#((ftp|http)://\S*[^\s."')>])#$1#g; + $_[0] =~ s/(\0<(?:mailto:|)(.*@.*)\0>)/$1<\/a>/g; + $_[0] =~ s/(<(?:mailto:|)(.*@.*)>)/$1<\/a>/g; }