浏览代码

Поправка

Book Pauk 6 年之前
父节点
当前提交
f7596dbe4e
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      client/components/Reader/share/BookParser.js

+ 2 - 0
client/components/Reader/share/BookParser.js

@@ -136,6 +136,8 @@ export default class BookParser {
 
 
         const onTextNode = (text) => {// eslint-disable-line no-unused-vars
         const onTextNode = (text) => {// eslint-disable-line no-unused-vars
             text = he.decode(text);
             text = he.decode(text);
+            text = text.replace(/>/g, '>');
+            text = text.replace(/</g, '&lt;');
             text = text.replace(/[\t\n\r]/g, ' ');
             text = text.replace(/[\t\n\r]/g, ' ');
 
 
             if (text != ' ' && text.trim() == '')
             if (text != ' ' && text.trim() == '')