escape the prompt too

This commit is contained in:
Ralf 2021-06-02 21:23:36 +02:00
parent 1e95f7e1a5
commit e9b62cd3ae
1 changed files with 1 additions and 1 deletions

View File

@ -1091,7 +1091,7 @@ def applyoutputformatting(txt):
# Sends the current story content to the Game Screen
#==================================================================#
def refresh_story():
text_parts = ['<chunk n="0" id="n0">', vars.prompt, '</chunk>']
text_parts = ['<chunk n="0" id="n0">', html.escape(vars.prompt), '</chunk>']
for idx, item in enumerate(vars.actions, start=1):
text_parts.extend(('<chunk n="', str(idx), '" id="n', str(idx), '">', html.escape(item), '</chunk>'))
emit('from_server', {'cmd': 'updatescreen', 'data': formatforhtml(''.join(text_parts))})