Permalink
Browse files

Escape the commands (in case there is utf-8 text) when outputting the…

… admin command log.
  • Loading branch information...
1 parent fcaca2e commit 0c08df05042b3b5ddee01f03d8d2a017359cd05b Jason Grout committed Oct 4, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 admin.py
View
@@ -16,7 +16,10 @@ def get_commands():
f.write("<pre>")
f.write("<b>"+str(m.get('timestamp',None))+"</b>")
f.write("\n")
- f.write(escape(m['content']['code']))
+ code=m['content']['code']
+
+ s=escape(code if code is not None else 'None')
+ f.write(s.encode('utf-8'))
f.write("</pre>")
f.write("</body></html>")

0 comments on commit 0c08df0

Please sign in to comment.