diff --git a/aiserver.py b/aiserver.py
index 23229cd0..8dcec2af 100644
--- a/aiserver.py
+++ b/aiserver.py
@@ -1091,7 +1091,7 @@ def applyoutputformatting(txt):
# Sends the current story content to the Game Screen
#==================================================================#
def refresh_story():
- text_parts = ['', vars.prompt, '']
+ text_parts = ['', html.escape(vars.prompt), '']
for idx, item in enumerate(vars.actions, start=1):
text_parts.extend(('', html.escape(item), ''))
emit('from_server', {'cmd': 'updatescreen', 'data': formatforhtml(''.join(text_parts))})