From 19d4e3832d83dd9909a8d9527b6ffafa23c35379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 1 Dec 2022 13:22:32 +0100 Subject: [PATCH 1/3] Update requirements.txt Typos in the versions. --- requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index c9985e58..c80b1f7e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ # First level requirements -imapclient>=2.3.0<3 +imapclient>=2.3.0,<3 olefile==0.46 tzlocal==4.2 compressed_rtf==1.0.6 ebcdic==1.1.1 -beautifulsoup4>=4.11.1<4.12 +beautifulsoup4>=4.11.1,<4.12 RTFDE==0.0.2 -chardet>=4.0.0<6 -red-black-tree-mod==1.20 +chardet>=4.0.0,<6 +red-black-tree-mod>=1.21 From 67915276144b82dcc414813508d6541c7390fe85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 1 Dec 2022 13:43:04 +0100 Subject: [PATCH 2/3] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c80b1f7e..fe3c9aa7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,4 +8,4 @@ ebcdic==1.1.1 beautifulsoup4>=4.11.1,<4.12 RTFDE==0.0.2 chardet>=4.0.0,<6 -red-black-tree-mod>=1.21 +red-black-tree-mod==1.20 From 7e056ad86f2ecb4d580bcfab78ebce5c9c1d7515 Mon Sep 17 00:00:00 2001 From: TheElementalOfDestruction Date: Sat, 3 Dec 2022 00:07:31 -0800 Subject: [PATCH 3/3] v0.38.3 --- CHANGELOG.md | 4 ++++ README.rst | 4 ++-- extract_msg/__init__.py | 4 ++-- extract_msg/message_base.py | 4 ++-- extract_msg/message_signed_base.py | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a44821dc..706909a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +**v0.38.3** +* Fixed issues in HTML generation that caused line breaks to be omitted from large sections of the text. +* Fixed issues with requirements file. + **v0.38.2** * Fixed new `NameError` accidentally introduced in the previous version. diff --git a/README.rst b/README.rst index 7040bc4b..dbf7974d 100644 --- a/README.rst +++ b/README.rst @@ -233,8 +233,8 @@ your access to the newest major version of extract-msg. .. |License: GPL v3| image:: https://img.shields.io/badge/License-GPLv3-blue.svg :target: LICENSE.txt -.. |PyPI3| image:: https://img.shields.io/badge/pypi-0.38.2-blue.svg - :target: https://pypi.org/project/extract-msg/0.38.2/ +.. |PyPI3| image:: https://img.shields.io/badge/pypi-0.38.3-blue.svg + :target: https://pypi.org/project/extract-msg/0.38.3/ .. |PyPI2| image:: https://img.shields.io/badge/python-3.6+-brightgreen.svg :target: https://www.python.org/downloads/release/python-367/ diff --git a/extract_msg/__init__.py b/extract_msg/__init__.py index 3db991b0..6cb66c3b 100644 --- a/extract_msg/__init__.py +++ b/extract_msg/__init__.py @@ -27,8 +27,8 @@ # along with this program. If not, see . __author__ = 'Destiny Peterson & Matthew Walker' -__date__ = '2022-12-01' -__version__ = '0.38.2' +__date__ = '2022-12-03' +__version__ = '0.38.3' import logging diff --git a/extract_msg/message_base.py b/extract_msg/message_base.py index 8068c856..dceb5596 100644 --- a/extract_msg/message_base.py +++ b/extract_msg/message_base.py @@ -1160,7 +1160,7 @@ def htmlBody(self) -> Optional[bytes]: if not self._htmlBody and self.body: # Convert the plain text body to html. logger.info('HTML body was not found, attempting to generate from plain text body.') - correctedBody = html.escape(self.body).replace('\r', '').replace('\n', '
') + correctedBody = html.escape(self.body).replace('\r', '').replace('\n', '
') self._htmlBody = f'{correctedBody}'.encode('utf-8') if not self._htmlBody: @@ -1312,7 +1312,7 @@ def rtfEncapInjectableHeader(self) -> str: """ prefix = r'\htmlrtf {\htmlrtf0 {\*\htmltag96
}{\*\htmltag96
}{\*\htmltag64

}' suffix = r'{\*\htmltag244 }{\*\htmlrag252 }\htmlrtf \par\par\htmlrtf0 {\*\htmltag72

}{\*\htmltag104
}{\*\htmltag104
}\htmlrtf }\htmlrtf0 ' - joinStr = r'{\*\htmltag116
}\htmlrtf \line\htmlrtf0 ' + joinStr = r'{\*\htmltag116
}\htmlrtf \line\htmlrtf0 ' formatter = (lambda name, value : fr'\htmlrtf {{\b\htmlrtf0{{\*\htmltag84 }}{name}: {{\*\htmltag92 }}\htmlrtf \b0\htmlrtf0 {inputToString(rtfSanitizeHtml(value), self.stringEncoding)}\htmlrtf }}\htmlrtf0') return self.getInjectableHeader(prefix, joinStr, suffix, formatter) diff --git a/extract_msg/message_signed_base.py b/extract_msg/message_signed_base.py index b1e9c0a9..461f0a94 100644 --- a/extract_msg/message_signed_base.py +++ b/extract_msg/message_signed_base.py @@ -130,7 +130,7 @@ def htmlBody(self) -> Optional[bytes]: elif self.body: # Convert the plain text body to html. logger.info('HTML body was not found, attempting to generate from plain text body.') - correctedBody = html.escpae(self.body).replace('\r', '').replace('\n', '
') + correctedBody = html.escpae(self.body).replace('\r', '').replace('\n', '
') self._htmlBody = f'{correctedBody}'.encode('utf-8') else: logger.info('HTML body could not be found nor generated.')