diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/public_body.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index 60f1ed183..e8809c8f5 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -26,7 +26,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: public_body.rb,v 1.145 2009-06-16 22:21:13 francis Exp $ +# $Id: public_body.rb,v 1.146 2009-06-16 22:31:46 francis Exp $ require 'csv' require 'set' @@ -496,6 +496,10 @@ class PublicBody < ActiveRecord::Base def notes_as_html self.notes end + def notes_without_html + # assume notes are reasonably behaved HTML, so just use simple regexp on this + self.notes.gsub(/<\/?[^>]*>/, "") + end end |