diff options
| author | jvoisin | 2019-02-08 23:23:56 +0100 |
|---|---|---|
| committer | jvoisin | 2019-02-08 23:23:56 +0100 |
| commit | 6ef6aaa2221340f03c2571a3141c67ca027f5a4f (patch) | |
| tree | a84efe7a53bed478f163c210908ab28ff314504f /libmat2 | |
| parent | 6cc034e81bd0cea98dffe4d7311f3bd16178b63e (diff) | |
Improve a bit get_meta for libreoffice files
Diffstat (limited to 'libmat2')
| -rw-r--r-- | libmat2/office.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmat2/office.py b/libmat2/office.py index 0c9caa8..f3a5b22 100644 --- a/libmat2/office.py +++ b/libmat2/office.py | |||
| @@ -384,7 +384,7 @@ class LibreOfficeParser(ArchiveBasedAbstractParser): | |||
| 384 | return {} | 384 | return {} |
| 385 | with open(full_path, encoding='utf-8') as f: | 385 | with open(full_path, encoding='utf-8') as f: |
| 386 | try: | 386 | try: |
| 387 | results = re.findall(r"<((?:meta|dc|cp).+?)>(.+)</\1>", f.read(), re.I|re.M) | 387 | results = re.findall(r"<((?:meta|dc|cp).+?)[^>]*>(.+)</\1>", f.read(), re.I|re.M) |
| 388 | return {k:v for (k, v) in results} | 388 | return {k:v for (k, v) in results} |
| 389 | except (TypeError, UnicodeDecodeError): # We didn't manage to parse the xml file | 389 | except (TypeError, UnicodeDecodeError): # We didn't manage to parse the xml file |
| 390 | # We didn't manage to parse the xml file | 390 | # We didn't manage to parse the xml file |
