$th->thread;
my @args = (
"<html><head><title>$title</title>" .
- '<link rel=alternate title=Atom.feed href=' .
- $feed_opts->{atomurl} . ' type="application/atom+xml"/>' .
+ '<link rel=alternate title=Atom.feed href="' .
+ $feed_opts->{atomurl} . '" type="application/atom+xml"/>' .
'</head><body><pre>');
push @args, $feed_opts->{midurl};
dump_html_line($_, 0, \@args) for $th->rootset;
(defined($from) && length($from)) or $from = $from[0]->address;
$from = escapeHTML($from);
$subj = escapeHTML($subj);
- $args->[0] .= "<a href=$url>`-> $subj</a> $from\n";
+ $args->[0] .= "<a href=\"$url.html\">`-> $subj</a> $from\n";
} else {
$args->[0] .= "[ Message not available ]\n";
}
$cur .= shift(@sum) . ' ';
} while (@sum && length($cur) < 68);
$cur=~ s/ \z/ .../;
- "> <<a href=${full_pfx}#q${part_nr}_" . $n++ .
- ">$cur<\/a>>";
+ "> <<a href=\"${full_pfx}#q${part_nr}_" . $n++ .
+ "\">$cur<\/a>>";
} else {
$cur;
}
my $mid = $simple->header('Message-ID');
if (defined $mid) {
my ($html, $href) = trim_message_id($mid);
- $rv .= "Message-ID: <a href=$href.html>$html</a> ";
- $rv .= "(<a href=$href.txt>original</a>)\n";
+ $rv .= "Message-ID: <<a href=\"$href.html\">$html</a>> ";
+ $rv .= "(<a href=\"$href.txt\">original</a>)\n";
}
my $irp = $simple->header('In-Reply-To');
if (defined $irp) {
my ($html, $href) = trim_message_id($irp);
- $rv .= "In-Reply-To: <a href=$href.html>$html</a>\n";
+ $rv .= "In-Reply-To: <";
+ $rv .= "<a href=\"$href.html\">$html</a>>\n";
}
$rv .= "\n";
my $html = PublicInbox::View->as_html($s);
# ghetto
- like($html, qr/<a href="?hello%40/s, "MID link present");
+ like($html, qr/<a href="hello%40/s, "MID link present");
like($html, qr/hello world\b/, "body present");
like($html, qr/> keep this inline/, "short quoted text is inline");
like($html, qr/<a name=[^>]+>> Long and wordy/,
my $short = PublicInbox::View->as_html($s, $pfx);
like($short, qr/\n> keep this inline/,
"short quoted text is inline");
- like($short, qr/<a href=\Q$pfx\E#[^>]+>Long and wordy/,
+ like($short, qr/<a href="\Q$pfx\E#[^>]+>Long and wordy/,
"long quoted text is made into a link");
ok(length($short) < length($html), "short page is shorter");
}