From 02cdbe1c1638ba8e80351b39029c08343fab018b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 25 Jan 2020 04:45:04 +0000 Subject: linkify: move to_html over from ViewDiff 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. --- lib/PublicInbox/ViewVCS.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox/ViewVCS.pm') diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index fdca70cb..77b3ca28 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -90,8 +90,7 @@ sub show_other_result ($$) { } my $l = PublicInbox::Linkify->new; utf8::decode($$bref); - $l->linkify_1($$bref); - $$bref = '
'. $l->linkify_2(ascii_html($$bref));
+	$$bref = '
'. $l->to_html($$bref);
 	$$bref .= '

' . $$logref; html_page($ctx, 200, $bref); } @@ -125,9 +124,8 @@ sub solve_result { my $ref = ref($res); my $l = PublicInbox::Linkify->new; - $l->linkify_1($log); $log = '
debug log:

' .
-		$l->linkify_2(ascii_html($log)) . '
'; + $l->to_html($log) . '
'; $res or return html_page($ctx, 404, \$log); $ref eq 'ARRAY' or return html_page($ctx, 500, \$log); -- cgit v1.2.3-24-ge0c7