diff options
-rw-r--r-- | app/models/incoming_message.rb | 6 | ||||
-rw-r--r-- | config/packages | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index a37593b7c..961bb2330 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -17,12 +17,14 @@ # 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.88 2008-04-21 16:26:47 francis Exp $ +# $Id: incoming_message.rb,v 1.89 2008-04-21 16:43:54 francis Exp $ # TODO # Move some of the (e.g. quoting) functions here into rblib, as they feel # general not specific to IncomingMessage. +require 'htmlentities' + module TMail class Mail attr_accessor :url_part_number @@ -342,7 +344,7 @@ class IncomingMessage < ActiveRecord::Base text.gsub!(/<p[^>]+>/, "\n\n") text.gsub!(/<div[^>]+>/, "\n\n") text.gsub!(/<\/?[^>]*>/, "") - text = CGI::unescapeHTML(text) + text = HTMLEntities.decode_entities(text) end # Charset conversion, turn everything into UTF-8 diff --git a/config/packages b/config/packages index 8e175f24e..d549c2fb4 100644 --- a/config/packages +++ b/config/packages @@ -1,3 +1,4 @@ +ruby wv poppler-utils catdoc |