json: add more paranoid escaping stable
authorMatt Mackall <mpm@selenic.com>
Wed, 09 Oct 2013 11:50:19 -0700
branchstable
changeset 19882 55c763926a28
parent 19880 ba2be32d14f2
child 19883 904061628dc4
json: add more paranoid escaping
mercurial/templatefilters.py
--- 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):