From 1ce29ed01d88d96173b4a4a867128f3a513fa7d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 1 Dec 2020 02:22:00 +0100 Subject: mht: Encode HTML entities --- mht | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mht b/mht index 2a93b26..2e75d44 100755 --- a/mht +++ b/mht @@ -3,6 +3,7 @@ use v5.12; use warnings; +use HTML::Entities qw/encode_entities/; use Text::ParseWords qw/quotewords/; @@ -161,7 +162,7 @@ while (<>) { $empty .= "\n"; } else { print $empty; $empty = ''; - print "$_\n"; + print encode_entities($_) . "\n"; } } -- cgit v1.2.3