mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-23 02:13:23 +02:00
DOCX Input: Workaround buggy version of Microsoft Word converting newlines in the document summary into _x000d_. They are now ignored when reading metadata from docx files. Fixes #1321343 [DOCX input known characters metadata](https://bugs.launchpad.net/calibre/+bug/1321343)
This commit is contained in:
parent
245617c745
commit
b37e932668
1 changed files with 1 additions and 0 deletions
|
|
@ -54,6 +54,7 @@ def read_doc_props(raw, mi):
|
|||
desc = XPath('//dc:description')(root)
|
||||
if desc:
|
||||
raw = etree.tostring(desc[0], method='text', encoding=unicode)
|
||||
raw = raw.replace('_x000d_', '') # Word 2007 mangles newlines in the summary
|
||||
mi.comments = raw
|
||||
|
||||
langs = []
|
||||
|
|
|
|||
Loading…
Reference in a new issue