diff mercurial/templatefilters.py @ 19882:55c763926a28 stable

json: add more paranoid escaping
author Matt Mackall <mpm@selenic.com>
date Wed, 09 Oct 2013 11:50:19 -0700
parents 1afe5d3939db
children e828975722c8
line wrap: on
line diff
--- a/mercurial/templatefilters.py	Wed Oct 09 11:27:59 2013 -0700
+++ b/mercurial/templatefilters.py	Wed Oct 09 11:50:19 2013 -0700
@@ -213,6 +213,7 @@
 _escapes = [
     ('\\', '\\\\'), ('"', '\\"'), ('\t', '\\t'), ('\n', '\\n'),
     ('\r', '\\r'), ('\f', '\\f'), ('\b', '\\b'),
+    ('<', '\\u003c'), ('>', '\\u003e')
 ]
 
 def jsonescape(s):