mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +01:00
Fix UnicodeEncodeException errors when submitting tickets with non-ASCII characters. Thanks to gjedeer for the patch!
This commit is contained in:
parent
9cad876f71
commit
5a64c1bbad
@ -17,6 +17,8 @@ try:
|
||||
except ImportError:
|
||||
from base64 import decodestring as b64decode
|
||||
|
||||
from django.utils.encoding import smart_str
|
||||
|
||||
def send_templated_mail(template_name, email_context, recipients, sender=None, bcc=None, fail_silently=False, files=None):
|
||||
"""
|
||||
send_templated_mail() is a warpper around Django's e-mail routines that
|
||||
@ -251,6 +253,6 @@ def text_is_spam(text, request):
|
||||
'comment_author': '',
|
||||
}
|
||||
|
||||
return ak.comment_check(text, data=ak_data)
|
||||
return ak.comment_check(smart_str(text), data=ak_data)
|
||||
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user