jamesturk/django-honeypot

Any template with non-ascii characters gets a UnicodeDecodeError

jasonchrista opened this issue · 3 comments

This is because in the middleware you call render_to_string which eventually makes a call to force_unicode. Now when you call re.sub a conversion has to be made. The solution is to inline the template with triple quotes and not call render_to_string.

I can confirm that such a fix works for me.

i'm taking a look at this, inlining the template is a solution but isn't desirable

call force_unicode on body so re.sub doesn't throw up, closed by e11a0aa