0

I have used MarkiItUp to build a jquery editor. Now when user type content in textarea with html code, like this:

A new <strong>true</strong> question

When record was saved, it save A new <strong>true</strong> question. And when it display on page, it also display like content was saved, is A new <strong>true</strong> question . But i want the content display on web like this:

A new true question

How can i do that?

Thanh
  • 8,219
  • 5
  • 33
  • 56

1 Answers1

1

To display it, use html_safe. This way your string would be rendered as HTML.
Refer to this question for more info.
Ruby on Rails: how to render a string as HTML?

Community
  • 1
  • 1
MurifoX
  • 14,991
  • 3
  • 36
  • 60