mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-05-02 00:24:24 +02: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:
|
except ImportError:
|
||||||
from base64 import decodestring as b64decode
|
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):
|
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
|
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': '',
|
'comment_author': '',
|
||||||
}
|
}
|
||||||
|
|
||||||
return ak.comment_check(text, data=ak_data)
|
return ak.comment_check(smart_str(text), data=ak_data)
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user