odf file metadata was not properly processed

This commit is contained in:
Jean-Francois Dockes 2017-03-07 18:28:23 +01:00
parent c9ab4d9408
commit 4de12c11b7

View File

@ -143,8 +143,8 @@ class OOExtractor:
self.em.rclog("unzip failed: %s" % err) self.em.rclog("unzip failed: %s" % err)
return (False, "", "", rclexecm.RclExecM.eofnow) return (False, "", "", rclexecm.RclExecM.eofnow)
docdata = b'<html><head><meta http-equiv="Content-Type"' \ docdata = b'<html>\n<head>\n<meta http-equiv="Content-Type"' \
b'content="text/html; charset=UTF-8"></head><body>' b'content="text/html; charset=UTF-8">'
try: try:
metadata = zip.read("meta.xml") metadata = zip.read("meta.xml")
@ -157,6 +157,8 @@ class OOExtractor:
#self.em.rclog("no/bad metadata in %s" % fn) #self.em.rclog("no/bad metadata in %s" % fn)
pass pass
docdata += b'</head>\n<body>\n'
try: try:
content = zip.read("content.xml") content = zip.read("content.xml")
if content: if content: