aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/incoming_message.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/incoming_message.rb')
-rw-r--r--app/models/incoming_message.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 0a5e6bba2..efec2885a 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -17,7 +17,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: incoming_message.rb,v 1.91 2008-04-21 21:48:50 francis Exp $
+# $Id: incoming_message.rb,v 1.92 2008-04-30 01:19:53 francis Exp $
# TODO
# Move some of the (e.g. quoting) functions here into rblib, as they feel
@@ -536,6 +536,10 @@ class IncomingMessage < ActiveRecord::Base
IO.popen("/usr/bin/catdoc " + tempfile.path, "r") do |child|
text += child.read() + "\n\n"
end
+ elsif attachment.content_type == 'text/html'
+ IO.popen("/usr/bin/lynx -force_html -dump " + tempfile.path, "r") do |child|
+ text += child.read() + "\n\n"
+ end
elsif attachment.content_type == 'application/msexcel'
# Bit crazy using strings - but xls2csv, xlhtml and py_xls2txt
# only extract text from cells, not from floating notes. catdoc