Re: hyperlinked url modification

1998-10-12 22:21:14
On October 12, 1998 at 10:58, Emery Ford wrote:

The way it currently hyperlinks urls includes includes often used
punctuation in the context of a sentence.

Things like '?' and '!' at the end were unintentionally left out.

Also, query strings aren't
usually hyperlinked appropriately.  

This is a known limitation.

All of the changes mentioned here only afffect the  file

$HUrlExp        = $Url . q%[^\s\(\)\|<>"']*[^\.;,"'\|\[\]\(\)\s<>\?\!]%;

This allows query stings such as,
which are currently broken off at the first ampersand.  

And broke with what you have.  "Htmlization" is done first before
URL detection, so '&' will actually become '&amp;'.  If you include
'&' in the expression, then you are actually generating an incorrect
link. ('&' was a horrible choice as an argument separator)

    $str =~ s/A\&nbsp;\&nbsp;HREF/A HREF/g; # ADDED BY EMERY

Not good if "A&nbsp;&nbsp;HREF" is actual message data.  Also, does
not deal with the case when the target option is specified.

I have code that does a better job with URL detection (and even handles
the <URL:...> notation with embedded newlines), but supporting
"keepspace" causes a problem.


             Earl Hood              | University of California: Irvine
      ehood(_at_)medusa(_dot_)acs(_dot_)uci(_dot_)edu      |      Electronic 
Loiterer | Dabbler of SGML/WWW/Perl/MIME

<Prev in Thread] Current Thread [Next in Thread>