aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-08-12 16:06:28 +0100
committerSeb Bacon <seb.bacon@gmail.com>2011-08-12 16:11:20 +0100
commitdbac4121cae0d620c7c11c6731fe5344ff1c677e (patch)
treeca893bc09c9e09e93e1ed400495ba9c73333419a /app/models
parent7705f6754184d471fb5da38c5d8671a7737bcdd6 (diff)
Force elinks to assume UTF8 character set for its input (used when making plain text versions of HTML email)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/incoming_message.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 3d128d8cd..b0b02fdda 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -1135,7 +1135,7 @@ class IncomingMessage < ActiveRecord::Base
elsif content_type == 'text/html'
# lynx wordwraps links in its output, which then don't get formatted properly
# by Alaveteli. We use elinks instead, which doesn't do that.
- external_command("/usr/bin/elinks", "-dump-charset", "utf-8", "-force-html", "-dump",
+ external_command("/usr/bin/elinks", "-eval", "'set document.codepage.assume = \"utf-8\"'", "-dump-charset", "utf-8", "-force-html", "-dump",
tempfile.path, :append_to => text)
elsif content_type == 'application/vnd.ms-excel'
# Bit crazy using /usr/bin/strings - but xls2csv, xlhtml and