aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2020-12-01 02:22:00 +0100
committerJohn Ankarström <john@ankarstrom.se>2020-12-01 02:25:53 +0100
commit1ce29ed01d88d96173b4a4a867128f3a513fa7d0 (patch)
tree70cff634449194bf1502943356af3443a07b3149
parentaf599c12b55678276bcda842b705633b0a9d8a2d (diff)
downloadmht-1ce29ed01d88d96173b4a4a867128f3a513fa7d0.tar.gz
mht: Encode HTML entities
-rwxr-xr-xmht3
1 files changed, 2 insertions, 1 deletions
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";
}
}