diff --git a/CHANGES.rst b/CHANGES.rst
index 891eaf9..c5dd815 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,7 @@
+0.11.2 (2020-11-09)
+-------------------
+- fix #323
+
0.11.1 (2020-10-27)
-------------------
- fix #320
diff --git a/docxtpl/__init__.py b/docxtpl/__init__.py
index 4bb4b80..dc8b2e1 100644
--- a/docxtpl/__init__.py
+++ b/docxtpl/__init__.py
@@ -4,7 +4,7 @@ Created : 2015-03-12
@author: Eric Lapouyade
"""
-__version__ = '0.11.1'
+__version__ = '0.11.2'
import functools
import io
@@ -246,14 +246,14 @@ class DocxTemplate(object):
return xml
def resolve_run(paragraph_properties, m):
- run_properties = re.search(r'.*', m.group(0))
+ run_properties = re.search(r'.*?', m.group(0))
run_properties = run_properties.group(0) if run_properties else ''
return re.sub(r']*)?>.*?',
lambda x: resolve_text(run_properties, paragraph_properties, x), m.group(0),
flags=re.DOTALL)
def resolve_paragraph(m):
- paragraph_properties = re.search(r'.*', m.group(0))
+ paragraph_properties = re.search(r'.*?', m.group(0))
paragraph_properties = paragraph_properties.group(0) if paragraph_properties else ''
return re.sub(r']*)?>.*?',
lambda x: resolve_run(paragraph_properties, x),
diff --git a/tests/escape.py b/tests/escape.py
index c4281a5..76f3a8a 100644
--- a/tests/escape.py
+++ b/tests/escape.py
@@ -21,6 +21,7 @@ Here is a new paragraph\a
Here is a page break : \f
That's it
""",
+ 'some_html' : 'HTTP/1.1 200 OK\nServer: Apache-Coyote/1.1\nCache-Control: no-store\nExpires: Thu, 01 Jan 1970 00:00:00 GMT\nPragma: no-cache\nContent-Type: text/html;charset=UTF-8\nContent-Language: zh-CN\nDate: Thu, 22 Oct 2020 10:59:40 GMT\nContent-Length: 9866\n\n\n
\n Struts Problem Report\n \n\n\n...\n\n',
}
tpl.render(context)
diff --git a/tests/templates/escape_tpl.docx b/tests/templates/escape_tpl.docx
index d377494..1f74645 100644
Binary files a/tests/templates/escape_tpl.docx and b/tests/templates/escape_tpl.docx differ