Filter article JSON through RubyPants

This commit is contained in:
Wesley Moore 2010-06-15 08:19:12 +10:00
parent d15d7cb2c6
commit ae6811ad41

View file

@ -14,11 +14,11 @@ module WezM
def article_to_json(article) def article_to_json(article)
{ {
:title => article[:title], :title => RubyPants.new(article[:title]).to_html,
:path => article.identifier, :path => article.identifier,
:date => Time.parse(article[:created_at]).rfc2822, :date => Time.parse(article[:created_at]).rfc2822,
:text => article[:title], :text => RubyPants.new(article[:title]).to_html,
:extra => article[:extra] || " " :extra => RubyPants.new(article[:extra] || " ").to_html
} }
end end