aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2010-03-10 15:28:40 +0000
committerFrancis Irving <francis@mysociety.org>2010-03-10 15:28:40 +0000
commit062849c75d5c7b4b83772a212a8a871c5d8433f7 (patch)
tree9f63d2582a0b2d9071e291a76ffda917b9886ba4 /app/models
parent1dea40cd2d2ff1217f8e3145df9f3efc31226fe8 (diff)
Remove colorising from HTML in XLS conversion
Diffstat (limited to 'app/models')
-rw-r--r--app/models/incoming_message.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 4bab7b6ec..8ea4f0fb7 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -366,7 +366,10 @@ class FOIAttachment
html = File.read(tempfile.path + ".html")
File.unlink(tempfile.path + ".html")
elsif self.content_type == 'application/vnd.ms-excel'
- IO.popen("/usr/bin/xlhtml -a " + tempfile.path + "", "r") do |child|
+ # Don't colorise, e.g. otherwise this one comes out with white
+ # text which is nasty:
+ # http://www.whatdotheyknow.com/request/30485/response/74705/attach/html/2/Empty%20premises%20Sefton.xls.html
+ IO.popen("/usr/bin/xlhtml -nc -a " + tempfile.path + "", "r") do |child|
html = child.read()
wrapper_id = "wrapper_xlhtml"
end