method

to_s

Importance_1
v7.2.3 - Show latest stable - 0 notes - Class: Content
to_s() public

Safely transforms Content into an HTML String.

content = ActionText::Content.new(content: "<h1>Funny times!</h1>")
content.to_s # => "<h1>Funny times!</h1>"

content = ActionText::Content.new("<div onclick='action()'>safe<script>unsafe</script></div>")
content.to_s # => "<div>safeunsafe</div>"
Show source
Register or log in to add new notes.