From ac49ad1bcfa889b8e1aa74dfaf31f4f4fed5fbc1 Mon Sep 17 00:00:00 2001 From: Ariel Sosnovsky Date: Wed, 21 Nov 2018 09:19:33 -0500 Subject: [PATCH] - sanitizing the xml chars --- .version | 2 +- pdfmajor/__init__.py | 2 +- pdfmajor/converters/XMLConverter.py | 2 +- setup.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.version b/.version index f4a3d44..f1a3de1 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -v1.1.9 \ No newline at end of file +v1.1.10 \ No newline at end of file diff --git a/pdfmajor/__init__.py b/pdfmajor/__init__.py index 84d95aa..15ed189 100644 --- a/pdfmajor/__init__.py +++ b/pdfmajor/__init__.py @@ -86,7 +86,7 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -__version__ = (1, 1, 9) +__version__ = (1, 1, 10) if __name__ == '__main__': print( diff --git a/pdfmajor/converters/XMLConverter.py b/pdfmajor/converters/XMLConverter.py index f3da096..dba1084 100644 --- a/pdfmajor/converters/XMLConverter.py +++ b/pdfmajor/converters/XMLConverter.py @@ -131,7 +131,7 @@ class XMLConverter(PDFConverter): 'y0': char.y0, 'y1': char.y1, }, no_additional_char=True): - self.write(char.get_text(), lineend='', deep_space="") + self.write(saxutils.escape(char.get_text()), lineend='', deep_space="") def render_char_block(self, char_block: LTCharBlock): attr = { diff --git a/setup.py b/setup.py index 56839af..54b9d13 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ import sys with open('README.md') as readme_file: SETUP = { "name": "pdfmajor", - "version": "1.1.9", + "version": "1.1.10", "packages": find_packages(include=['pdfmajor*']), "install_requires": [ 'pycryptodome',