diff options
author | Francis Irving <francis@mysociety.org> | 2010-03-10 15:28:40 +0000 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-03-10 15:28:40 +0000 |
commit | 062849c75d5c7b4b83772a212a8a871c5d8433f7 (patch) | |
tree | 9f63d2582a0b2d9071e291a76ffda917b9886ba4 /app/models | |
parent | 1dea40cd2d2ff1217f8e3145df9f3efc31226fe8 (diff) |
Remove colorising from HTML in XLS conversion
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/incoming_message.rb | 5 |
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 |