# HG changeset patch # User Matt Mackall # Date 2013-10-09 18:50:19 # Node ID 55c763926a28982ce0003078fb38c6db58bca8aa # Parent ba2be32d14f217271e8e1be99fccbba855eaa673 json: add more paranoid escaping diff --git a/mercurial/templatefilters.py b/mercurial/templatefilters.py --- a/mercurial/templatefilters.py +++ b/mercurial/templatefilters.py @@ -213,6 +213,7 @@ def _uescape(c): _escapes = [ ('\\', '\\\\'), ('"', '\\"'), ('\t', '\\t'), ('\n', '\\n'), ('\r', '\\r'), ('\f', '\\f'), ('\b', '\\b'), + ('<', '\\u003c'), ('>', '\\u003e') ] def jsonescape(s):