]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: escape Subject HTML directly
authorEric Wong <e@yhbt.net>
Sat, 15 Feb 2020 09:46:38 +0000 (09:46 +0000)
committerEric Wong <e@yhbt.net>
Sun, 16 Feb 2020 00:06:46 +0000 (00:06 +0000)
No need to use the over-engineered Hval OO API when the subject
is already normalized and there's no trailing spaces because of
normalization.

lib/PublicInbox/View.pm

index 033a0c14b05d0dcb427ff5732c0a282c4ab7b5f5..d4bfa62d660e529d04ac12f50db926cf98457263 100644 (file)
@@ -1090,7 +1090,7 @@ sub dump_topics {
                my $mid = delete $seen->{$top_subj};
                my $href = mid_escape($mid);
                my $prev_subj = [ split(/ /, $top_subj) ];
-               $top_subj = PublicInbox::Hval->new($top_subj)->as_html;
+               $top_subj = ascii_html($top_subj);
                $ds = fmt_ts($ds);
 
                # $n isn't the total number of posts on the topic,