+ my ($sponsor, $url) = undef;
+ $output{sponsor} = undef;
+ foreach $sponsor (@{$data->{sponsor}}) {
+ $sponsor =~ m#((http|ftp)://\S+)#i;
+ $url = $1;
+ $sponsor =~ s/\s*$url\s*//;
+ $output{sponsor} .= "<br>" if ($output{sponsor});
+ if ($url) {
+ $output{sponsor} .= sprintf("<a href=\"%s\">%s</a>", $url, $sponsor);
+ } else {
+ $output{sponsor} .= $sponsor;
+ }
+ }
+
+ #Reformat purposes to be pleasing for the human eye:
+ $output{purpose} = join(",", @{$data->{purpose}});