Escape HTML characters when printing the train

Since it's wrapped in a `<pre>`, I assume it's meant to be inserted into
HTML?
This commit is contained in:
noelle 2025-06-02 17:14:51 -04:00
parent 0b53c462de
commit 6063c8b3b3
Signed by: noelle
SSH Key Fingerprint: SHA256:EDORP92Wc6hxhvIeQjJvQ71ko3pgKc58DHduv2+tYg8

View File

@ -41,6 +41,7 @@ import curses
from signal import signal, SIGINT
import time # allowing the loop steps of train animation to be slowed
import string # for input validation
from html import escape
from inspect import cleandoc
from pathlib import Path
@ -339,7 +340,7 @@ train_str = "\n".join(train)
if print_train:
print("<pre>")
print(train_str)
print(escape(train_str))
print("</pre>")
sys.exit()