--- iso2022jp.pl.orig	Thu Sep 30 10:20:36 1999
+++ iso2022jp.pl	Fri Oct  8 19:00:39 1999
@@ -30,7 +30,8 @@
 $Url    	= '(http://|https://|ftp://|afs://|wais://|telnet://|ldap://' .
 		   '|gopher://|news:|nntp:|mid:|cid:|mailto:|prospero:)';
 $UrlExp 	= $Url . q%[^\s\(\)\|<>"']*[^\.?!;,"'\|\[\]\(\)\s<>]%;
-$HUrlExp	= $Url . q%[^\s\(\)\|<>"'\&]*[^\.?!;,"'\|\[\]\(\)\s<>\&]%;
+# $HUrlExp	= $Url . q%[^\s\(\)\|<>"'\&]*[^\.?!;,"'\|\[\]\(\)\s<>\&]%;
+$HUrlExp	= $Url . q%[^\s\(\)\|<>"']*[^\.?!;,"'\|\[\]\(\)\s<>]%;
 
 ##---------------------------------------------------------------------------##
 ##	str2html(): Convert an iso-2022-jp string into HTML.  Function
@@ -70,13 +71,15 @@
 	    if (s/^([^\033]+)//) {	# ASCII plain text
 		$ascii_text = $1;
 
+		## Convert URLs to hyperlinks
+		$ascii_text =~ s%($HUrlExp)%¡ãA HREF="$1"¡ä$1¡ã/A¡ä%gio
+		    unless $nourl;
 		# Replace meta characters in ASCII plain text
 		$ascii_text =~ s%\&%\&amp;%g;
 		$ascii_text =~ s%<%\&lt;%g;
 		$ascii_text =~ s%>%\&gt;%g;
-		## Convert URLs to hyperlinks
-		$ascii_text =~ s%($HUrlExp)%<A HREF="$1">$1</A>%gio
-		    unless $nourl;
+		$ascii_text =~ s%¡ã%<%g;
+		$ascii_text =~ s%¡ä%>%g;
 
 		$ret .= $ascii_text;
 	    } elsif (s/(\033\.[A-F])//) { # G2 Designate Sequence
