aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/incoming_message.rb6
-rw-r--r--app/models/info_request.rb4
2 files changed, 7 insertions, 3 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
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 43bc69259..2e614e4bd 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -21,10 +21,10 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: info_request.rb,v 1.100 2008-04-30 00:46:01 francis Exp $
+# $Id: info_request.rb,v 1.101 2008-04-30 01:19:53 francis Exp $
require 'digest/sha1'
-require 'vendor/plugins/acts_as_xapian/lib/acts_as_xapian'
+require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian')
class InfoRequest < ActiveRecord::Base
validates_presence_of :title, :message => "^Please enter a summary of your request"