html 태그가있는 문자열이 저장되었습니다.레일스에서 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)
[정규식] (http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454) ... –
RegEx ? 너트 같은데. Hpricot은 그것을 성취 할 수 없습니까? – Trip
하하, 재미있는 별명. – Trip