HTML-escape hexdump content so it doesn't break pages

This commit is contained in:
John Donaldson 2018-09-27 16:07:03 -05:00
parent 0c5d4ef889
commit d612e17d14
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import argparse
import contextlib
import glob
import hashlib
import html
import io
import importlib.machinery
import mistune
@ -244,7 +245,7 @@ class Puzzle:
self.body.write(' ')
self.body.write(' '.join(hexes[8:]))
self.body.write(' |')
self.body.write(''.join(chars))
self.body.write(html.escape(''.join(chars)))
self.body.write('|\n')
offset += len(chars)
self.body.write('{:08x}\n'.format(offset))