Skip to content
This repository
Browse code

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

… admin command log.
  • Loading branch information...
commit 0c08df05042b3b5ddee01f03d8d2a017359cd05b 1 parent fcaca2e
Jason Grout authored October 04, 2011

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  admin.py
5  admin.py
@@ -16,7 +16,10 @@ def get_commands():
16 16
             f.write("<pre>")
17 17
             f.write("<b>"+str(m.get('timestamp',None))+"</b>")
18 18
             f.write("\n")
19  
-            f.write(escape(m['content']['code']))
  19
+            code=m['content']['code']
  20
+            
  21
+            s=escape(code if code is not None else 'None')
  22
+            f.write(s.encode('utf-8'))
20 23
             f.write("</pre>")
21 24
         f.write("</body></html>")
22 25
     

0 notes on commit 0c08df0

Please sign in to comment.
Something went wrong with that request. Please try again.