--- trunk/back2html.pm 2003/07/04 21:35:34 65
+++ trunk/back2html.pm 2003/07/05 22:03:21 72
@@ -11,7 +11,12 @@
foreach $line (split(/###/,$html)) {
$out .= "
";
my @items = split(/#-#/,$line);
- $items[1] =~ s#(.*)\b(http://[\w\./]+)(\b?.*)#$1$2$3#g;
+ if ($items[1] =~ m#(http://[\S]+)\s*.*?#i) {
+ # chop URLS longer than 60 characters
+ my $url = substr($1,0,60);
+ $url .= "..." if (length($1) > 60);
+ $items[1] =~ s#(.*)\b(http://[\S]+)(\b?.*)#$1$url$3#g;
+ }
$out .= join(" | ",@items);
$out .= " |
\n";
}