From 5115b5d5f259535672e5a54be627d822cf3ff006 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 2 Dec 2013 21:04:47 +0530 Subject: [PATCH] ... --- src/calibre/gui2/tweak_book/boss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/boss.py b/src/calibre/gui2/tweak_book/boss.py index b92115bda8..55c5d81767 100644 --- a/src/calibre/gui2/tweak_book/boss.py +++ b/src/calibre/gui2/tweak_book/boss.py @@ -738,7 +738,7 @@ class Boss(QObject): if editor is None: if use_template is None: data = current_container().raw_data(name) - if isbytestring(data): + if isbytestring(data) and syntax in {'html', 'css', 'text', 'xml'}: try: data = data.decode('utf-8') except UnicodeDecodeError: