Index: tools/json_schema_compiler/highlighters/none_highlighter.py |
diff --git a/tools/json_schema_compiler/highlighters/none_highlighter.py b/tools/json_schema_compiler/highlighters/none_highlighter.py |
index 873a00bcff758cbc1488d87a2ea29097998b074a..ac1cc2b4b2684e32e28efb33da9c8b8a527a1391 100644 |
--- a/tools/json_schema_compiler/highlighters/none_highlighter.py |
+++ b/tools/json_schema_compiler/highlighters/none_highlighter.py |
@@ -2,6 +2,8 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+import cgi |
+ |
class NoneHighlighter(object): |
"""Highlighter that just wraps code in a <pre>. |
""" |
@@ -9,7 +11,7 @@ class NoneHighlighter(object): |
return '' |
def GetCodeElement(self, code, style): |
- return '<pre>' + code + '</pre>' |
+ return '<pre>' + cgi.escape(code) + '</pre>' |
def DisplayName(self): |
return 'none' |