mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -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…
x
Reference in New Issue
Block a user