From b7efcea021321cb8d6fe0abb271fc406d22a45e2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 12 Dec 2013 10:31:02 +0530 Subject: [PATCH] Do not auto replace named entities when committing data from editors as it can be confusing, changing what is in the container compared to what is on screen --- src/calibre/gui2/tweak_book/editor/widget.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/calibre/gui2/tweak_book/editor/widget.py b/src/calibre/gui2/tweak_book/editor/widget.py index 88d991c433..5fa7905498 100644 --- a/src/calibre/gui2/tweak_book/editor/widget.py +++ b/src/calibre/gui2/tweak_book/editor/widget.py @@ -10,7 +10,6 @@ import unicodedata from PyQt4.Qt import QMainWindow, Qt, QApplication, pyqtSignal -from calibre import xml_replace_entities from calibre.gui2 import error_dialog from calibre.gui2.tweak_book import actions, current_container from calibre.gui2.tweak_book.editor.text import TextEdit @@ -60,8 +59,6 @@ class Editor(QMainWindow): def data(self): def fget(self): ans = self.get_raw_data() - if self.syntax == 'html': - ans = xml_replace_entities(ans) return ans.encode('utf-8') def fset(self, val): self.editor.load_text(val, syntax=self.syntax)