diff options
author | francis <francis> | 2008-04-21 16:43:54 +0000 |
---|---|---|
committer | francis <francis> | 2008-04-21 16:43:54 +0000 |
commit | 7e768f6ec52af68bcabfa6cc1167a77912bd8eb2 (patch) | |
tree | 933b70fb0449090142659179f786ddbca7ccf819 /app/models | |
parent | e50107e0b5dbc9d5bc76a093b622fd7a4d031fab (diff) |
Convert all entities.
Some packages.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/incoming_message.rb | 6 |
1 files changed, 4 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 |