/[webpac]/trunk/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

Contents of /trunk/back2html.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 64 - (show annotations)
Fri Jul 4 20:41:17 2003 UTC (16 years, 3 months ago) by dpavlin
File size: 457 byte(s)
create http links

1 #
2 # reformat html inside xml back to html (basically, support for tables)
3 #
4 # filed #-# field ###
5 # ...
6
7 sub back2html {
8 my $html = shift;
9
10 my $out;
11 foreach $line (split(/###/,$html)) {
12 $out .= "<tr><td>";
13 my @items = split(/#-#/,$line);
14 if ($items[1] =~ m#^http://#) {
15 $items[1] = "<a href=\"$items[1]\">$items[1]</a>";
16 }
17 $out .= join("</td><td>",@items);
18 $out .= "</td></tr>\n";
19 }
20 $out =~ s/&lt;br\/*&gt;/<br\/>/g;
21 return $out;
22 }
23
24 1;

Properties

Name Value
cvs2svn:cvs-rev 1.4

  ViewVC Help
Powered by ViewVC 1.1.26