From cc51b6b57649986c209e5316234471cb7839d2e6 Mon Sep 17 00:00:00 2001 From: Yasuhiro Fujii Date: Fri, 5 Oct 2012 19:55:42 +0900 Subject: [PATCH] fix escape --- doc/prep.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/prep.js b/doc/prep.js index 1cd5bec81b2..3a1e60ec423 100755 --- a/doc/prep.js +++ b/doc/prep.js @@ -60,9 +60,10 @@ while ((line = lines[cur++]) != null) { var html = '
', curstr = "", curstyle = null;
       function add(str, style) {
         if (style != curstyle) {
-          if (curstyle) html += '' + curstr
-            + "";
-          else if (curstr) html += curstr;
+          if (curstyle) html +=
+            '' +
+            CodeMirror.htmlEscape(curstr) + "";
+          else if (curstr) html += CodeMirror.htmlEscape(curstr);
           curstr = str; curstyle = style;
         } else curstr += str;
       }