From 6033d805f372f939c06e0fb34697d46329c9e0db Mon Sep 17 00:00:00 2001 From: Christopher Date: Sat, 4 Jun 2016 11:51:35 -0600 Subject: [PATCH 1/4] Add chars \r, \x0b and \x0c to scaped chars. --- secretary.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/secretary.py b/secretary.py index 722e1e6..0922f52 100644 --- a/secretary.py +++ b/secretary.py @@ -413,10 +413,13 @@ class Renderer(object): """ Replace line feed and/or tabs within text:span entities. """ - find_pattern = r'(?is)([^>]*?([\n|\t])[^<]*?)' + find_pattern = r'(?is)([^>]*?([\n|\t|\r|\x0b|\x0c])[^<]*?)' for m in re.findall(find_pattern, xml_text): replacement = m[1].replace('\n', '') replacement = replacement.replace('\t', '') + replacement = replacement.replace('\r', '') + replacement = replacement.replace('\x0b', '') + replacement = replacement.replace('\x0c', '') xml_text = xml_text.replace(m[1], replacement) return xml_text From d5ba72a83b284619e1c554a816dd9c2c4958d55f Mon Sep 17 00:00:00 2001 From: Christopher Date: Tue, 8 Aug 2017 20:48:27 -0600 Subject: [PATCH 2/4] Update version. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f667bf1..3ce47ca 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ class PyTest(TestCommand): setup( name='secretary', - version='0.2.15', + version='0.2.16', url='https://github.com/christopher-ramirez/secretary', license='MIT', author='Christopher Ramírez', From a33ba90b7bb1bba0c97be54c4907e045fdd8b5f9 Mon Sep 17 00:00:00 2001 From: Christopher Date: Tue, 8 Aug 2017 20:50:17 -0600 Subject: [PATCH 3/4] Document new version on readme.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7bbcf96..3bc0bb8 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,7 @@ Pad zeroes to `value` to the left until output value's length be equal to `lengt Secretary supports most of the jinja2 control structure/flow tags. But please avoid using the following tags since they are not supported: `block`, `extends`, `macro`, `call`, `include` and `import`. ### Version History +* **0.2.16**: Fix store of mimetype in rendered ODT archive. * **0.2.15**: Fix bug reported in #39 escaping Line-Feed and Tab chars inside `text:` elements. * **0.2.14**: Implement dynamic links escaping and fix #33. * **0.2.13**: Fix reported bug in markdown filter outputing emply lists. From feabe1dc3c50fe10bd3e5e38c4c238cce6f80271 Mon Sep 17 00:00:00 2001 From: Christopher Date: Tue, 8 Aug 2017 20:52:07 -0600 Subject: [PATCH 4/4] FIx unresolved merge conflic. --- secretary.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/secretary.py b/secretary.py index 41e6bdd..37bf981 100644 --- a/secretary.py +++ b/secretary.py @@ -438,11 +438,7 @@ class Renderer(object): """ Replace line feed and/or tabs within text:span entities. """ -<<<<<<< HEAD - find_pattern = r'(?is)([^>]*?([\n|\t|\r|\x0b|\x0c])[^<]*?)' -======= find_pattern = r'(?is)([^>]*?([\n\t])[^<]*?)' ->>>>>>> f74046fb09401facbece39056dd53dafe3f814e9 for m in re.findall(find_pattern, xml_text): replacement = m[1].replace('\n', '') replacement = replacement.replace('\t', '')