Commit b681e2bd by arjun810

Merge pull request #702 from MITx/kimth/fix-dynamath

Escape quotations, lt/gt, ampersand
parents 9b6007fc 1dfd222b
......@@ -333,6 +333,10 @@ def textline_dynamath(element, value, status, render_template, msg=''):
if '' in preprocessor.values():
preprocessor = None
# Escape characters in student input for safe XML parsing
escapedict = {'"': '"'}
value = saxutils.escape(value, escapedict)
context = {'id': eid, 'value': value, 'state': status, 'count': count, 'size': size,
'msg': msg, 'hidden': hidden,
'preprocessor': preprocessor,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment