Skip to content
Snippets Groups Projects
Commit b2911f4f authored by kaiyou's avatar kaiyou
Browse files

Fix HTML encoding of captcha strings

parent 53d02e5e
No related branches found
No related tags found
No related merge requests found
......@@ -64,8 +64,7 @@ class ImageCaptchaField(fields.CaptchaField):
output = base64.b64encode(png.getvalue()).decode("ascii")
return widgets.HTMLString(
'<p><img src="data:image/png;base64,{}"></p>'.format(output)
+ super(ImageCaptchaField, self).__call__(**kwargs)
)
) + super(ImageCaptchaField, self).__call__(**kwargs)
def make_char(self, char, rotation_range=15):
""" Renders a character
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment