Skip to content

Commit

Permalink
- Fix broken ZMI DTML rendering for mixed unicode/bytes content (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Apr 25, 2019
1 parent ee16cae commit 671c687
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ https://github.com/zopefoundation/Zope/blob/4.0a6/CHANGES.rst
Fixes
+++++

- Fix broken ZMI DTML rendering for mixed unicode/bytes content
(`#271 <https://github.com/zopefoundation/Zope/issues/271>`_)

- Fix wrong `Content-Length` set by ``App.ImageFile`` on 304 responses
(`#513 <https://github.com/zopefoundation/Zope/issues/513>`_)

Expand Down
3 changes: 2 additions & 1 deletion src/App/special_dtml.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ def _exec(self, bound_data, args, kw):
value = self.ZDocumentTemplate_beforeRender(ns, _marker)
if value is _marker:
try:
result = render_blocks(self._v_blocks, ns)
result = render_blocks(self._v_blocks, ns,
encoding=self.encoding)
except DTReturn as v:
result = v.v

Expand Down

0 comments on commit 671c687

Please sign in to comment.