私はhtmlタグを含む文字列を保存しています。RailsでHTMLを解析するにはどうすればよいですか?
=> "<p>hey man this is crazy g funk</p>\n<p>here i come with another crazy message from..</p>\n<p>dj eassssy [email protected]#!.</p>"
これを解析して、HTMLタグの意味を表示しますか?
は、私が試した:= Post.text
=h Post.text
= RedCloth.new(Post.text).to_html
= Hpricot(Post.text)
[regex](http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454)... –
RegEx ?それはナッツのように聞こえる。 Hpricotはそれを達成できませんか? – Trip
haha、面白いニックネーム。 – Trip