aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorfrancis <francis>2008-04-21 16:22:24 +0000
committerfrancis <francis>2008-04-21 16:22:24 +0000
commit6993e5594b462bcf66ecb9f4201df1ae1a36a96d (patch)
tree5f5d03e2f2461263bcd567df6c6678bfbb957d56 /app/models
parente7733bf1d7fed7082f93f07b408c70746cf6d4d4 (diff)
Unescape entities when rendering HTML as plain text.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/incoming_message.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 8ccb21c9b..57e8e2a0a 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.86 2008-04-21 15:36:39 francis Exp $
+# $Id: incoming_message.rb,v 1.87 2008-04-21 16:22:24 francis Exp $
# TODO
# Move some of the (e.g. quoting) functions here into rblib, as they feel
@@ -339,6 +339,7 @@ class IncomingMessage < ActiveRecord::Base
text.gsub!(/<p[^>]+>/, "\n\n")
text.gsub!(/<div[^>]+>/, "\n\n")
text.gsub!(/<\/?[^>]*>/, "")
+ text = CGI::unescapeHTML(text)
end
# Charset conversion, turn everything into UTF-8