diff options
author | Francis Irving <francis@mysociety.org> | 2010-02-17 10:46:38 +0000 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-02-17 10:46:38 +0000 |
commit | f35fce89cf6b1445618073b249ea4a0de922a445 (patch) | |
tree | 113771b565196b26b53c67690b758d377f9c31fd | |
parent | e716c486b2686acd2f53cb85b6034f89186bde8c (diff) |
Use elinks instead of lynx as it doesn't word wrap links
-rw-r--r-- | app/models/incoming_message.rb | 4 | ||||
-rw-r--r-- | config/packages | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 9a2fd03f7..410a0a503 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -1137,7 +1137,9 @@ class IncomingMessage < ActiveRecord::Base text += child.read() + "\n\n" end elsif content_type == 'text/html' - IO.popen("/usr/bin/lynx -display_charset=UTF-8 -force_html -dump " + tempfile.path, "r") do |child| + # lynx wordwraps links in its output, which then don't get formatted properly + # by WhatDoTheyKnow. We use elinks instead, which doesn't do that. + IO.popen("/usr/bin/elinks -dump-charset utf-8 -force-html -dump " + tempfile.path, "r") do |child| text += child.read() + "\n\n" end elsif content_type == 'application/vnd.ms-excel' diff --git a/config/packages b/config/packages index 0e1625e24..2b4780019 100644 --- a/config/packages +++ b/config/packages @@ -11,6 +11,7 @@ gs-gpl catdoc links lynx +elinks unrtf libxapian-ruby1.8 gnuplot-nox |