diff options
author | Eric Wong <e@yhbt.net> | 2020-01-25 04:45:04 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-01-27 02:59:09 +0000 |
commit | 02cdbe1c1638ba8e80351b39029c08343fab018b (patch) | |
tree | cf1f05b6a0b8077fd701d8ac40d9fa6e7eb81d48 /lib/PublicInbox/View.pm | |
parent | f09b01e0e89dbdf0f0bd6bfae2f8545fa17657d2 (diff) | |
download | public-inbox-02cdbe1c1638ba8e80351b39029c08343fab018b.tar.gz |
We use the same idiom in many places for doing two-step linkification and HTML escaping. Get rid of an outdated comment in flush_quote while we're at it.
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r-- | lib/PublicInbox/View.pm | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index fd1bd7e2..e604aee0 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -496,13 +496,10 @@ sub multipart_text_as_html { sub flush_quote { my ($s, $l, $quot) = @_; - # show everything in the full version with anchor from - # short version (see above) - my $rv = $l->linkify_1($$quot); + my $rv = $l->to_html($$quot); # we use a <span> here to allow users to specify their own # color for quoted text - $rv = $l->linkify_2(ascii_html($rv)); $$quot = undef; $$s .= qq(<span\nclass="q">) . $rv . '</span>' } @@ -608,8 +605,7 @@ sub add_text_body { # callback for msg_iter flush_diff($rv, $ctx, $l); } else { # regular lines, OK - $l->linkify_1($cur); - $$rv .= $l->linkify_2(ascii_html($cur)); + $$rv .= $l->to_html($cur); $cur = undef; } } |