Commit 9e45f360 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Arnaud Fontaine

py2/py3: zope.contenttype.text_type() argument is bytes.

parent 5ad8708b
...@@ -6,7 +6,7 @@ try: ...@@ -6,7 +6,7 @@ try:
original_text_type = zope.contenttype.text_type original_text_type = zope.contenttype.text_type
def svg_fix_text_type(s): def svg_fix_text_type(s):
s = s.strip() s = s.strip()
if '<html>' not in s and "<svg" in s: if b'<html>' not in s and b"<svg" in s:
return 'image/svg+xml' return 'image/svg+xml'
# If it is not an svg, just try original behaviour. # If it is not an svg, just try original behaviour.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment