/[webpac]/branches/drustvene/back2html.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /branches/drustvene/back2html.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 65 by dpavlin, Fri Jul 4 21:35:34 2003 UTC revision 66 by dpavlin, Fri Jul 4 23:28:17 2003 UTC
# Line 11  sub back2html { Line 11  sub back2html {
11          foreach $line (split(/###/,$html)) {          foreach $line (split(/###/,$html)) {
12                  $out .= "<tr><td>";                  $out .= "<tr><td>";
13                  my @items = split(/#-#/,$line);                  my @items = split(/#-#/,$line);
14                  $items[1] =~ s#(.*)\b(http://[\w\./]+)(\b?.*)#$1<a href=\"$2\">$2</a>$3#g;                  if ($items[1] =~ m#(http://[\S]+)\s*.*?#i) {
15                            my $url = $1;
16                            # chop URLS longer than 60 characters
17                            my $url = substr($1,0,60);
18                            $url .= "..." if (length($1) > 60);
19                            $items[1] =~ s#(.*)\b(http://[\S]+)(\b?.*)#$1<a href=\"$2\">$url</a>$3#g;
20                    }
21                  $out .= join("</td><td>",@items);                  $out .= join("</td><td>",@items);
22                  $out .= "</td></tr>\n";                  $out .= "</td></tr>\n";
23          }          }

Legend:
Removed from v.65  
changed lines
  Added in v.66

  ViewVC Help
Powered by ViewVC 1.1.26