Any template with non-ascii characters gets a UnicodeDecodeError
jasonchrista opened this issue · 3 comments
jasonchrista commented
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.
mikek commented
I can confirm that such a fix works for me.
Deleted user commented
i'm taking a look at this, inlining the template is a solution but isn't desirable