Przeglądaj źródła

Поправка

Book Pauk 6 lat temu
rodzic
commit
f7596dbe4e
1 zmienionych plików z 2 dodań i 0 usunięć
  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
             text = he.decode(text);
+            text = text.replace(/>/g, '>');
+            text = text.replace(/</g, '&lt;');
             text = text.replace(/[\t\n\r]/g, ' ');
 
             if (text != ' ' && text.trim() == '')