Commit 5e588709 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

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

parent 52d217c5
......@@ -6,7 +6,7 @@ try:
original_text_type = zope.contenttype.text_type
def svg_fix_text_type(s):
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'
# 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