changeset 19882:55c763926a28 stable

json: add more paranoid escaping
author Matt Mackall <mpm@selenic.com>
date Wed, 09 Oct 2013 11:50:19 -0700
parents ba2be32d14f2
children 904061628dc4
files mercurial/templatefilters.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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):