openhealthcare / randomise.me

The Randomise Me Website
http://randomiseme.org
Other
7 stars 8 forks source link

Contact form borks on unicode input #213

Closed davidmiller closed 10 years ago

davidmiller commented 11 years ago

Traceback (most recent call last):

File "/home/app/randomise_me/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, _callback_args, *_callback_kwargs)

File "/home/app/randomise_me/local/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view return self.dispatch(request, _args, *_kwargs)

File "/home/app/randomise_me/local/lib/python2.7/site-packages/django/views/generic/base.py", line 86, in dispatch return handler(request, _args, *_kwargs)

File "/home/app/randomise_me/local/lib/python2.7/site-packages/django/views/generic/edit.py", line 165, in post return self.form_valid(form)

File "/home/app/randomise_me/local/lib/python2.7/site-packages/letter/contrib/contact.py", line 63, in form_valid form.send_email(to=self.to_addr)

File "/home/app/randomise_me/local/lib/python2.7/site-packages/letter/contrib/contact.py", line 30, in send_email self.cleaned_data['message'])

UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 402: ordinal not in range(128)

davidmiller commented 11 years ago

This is actually upstream in letter: https://github.com/davidmiller/letter

Will fix there.

davidmiller commented 10 years ago

Updating requirements.txt in https://github.com/openhealthcare/randomise.me/commit/8c63cc2bcdc7ff95cb66c02429f4900e6812313e seems to have fixed this.