fix encoding in sent messages (closes #308)
This commit is contained in:
parent
b76a2184bb
commit
c4d8f7de2e
1 changed files with 4 additions and 1 deletions
|
|
@ -232,7 +232,10 @@ class ContactThreadPage(PageBase):
|
||||||
|
|
||||||
def post(self, content):
|
def post(self, content):
|
||||||
if isinstance(content, unicode):
|
if isinstance(content, unicode):
|
||||||
content = content.encode('iso-8859-15', 'replace')
|
# LOL the data is Windows-1252 encoded, even if the charset label
|
||||||
|
# of the page is ISO-8859-1.
|
||||||
|
# That's crappy, but necessary if we want to use special chars.
|
||||||
|
content = content.encode('Windows-1252', 'replace')
|
||||||
|
|
||||||
if len(content) < 3:
|
if len(content) < 3:
|
||||||
raise AdopteCantPostMail("Your message is too short (minimum 3 chars)")
|
raise AdopteCantPostMail("Your message is too short (minimum 3 chars)")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue