2 # reformat html inside xml back to html (basically, support for tables)
13 foreach $line (split(/\s*###\s*/,$html)) {
14 $out .= "<tr><td valign=\"top\">";
15 my @items = split(/\s*#-#\s*/,$line);
16 # convert spaces in left field to non-breaking spaces
17 $items[0] =~ s#\s+# #g;
18 # try to make link on right field
19 if ($items[1] =~ m#(http://[\S]+)\s*.*?#i) {
20 # chop URLS longer than 60 characters
21 my $url = substr($1,0,60);
22 $url .= "..." if (length($1) > 60);
23 $items[1] =~ s#(.*)\b(http://[\S]+)(\b?.*)#$1<a href=\"$2\">$url</a>$3#g;
25 $out .= join("</td><td>",@items);
26 $out .= "</td></tr>\n";
28 $out =~ s/<br\/*>/<br\/>/g;