0

After parsing the json response I am getting the following content on my document. I wanted to display it in twitter widget format. I've tried http://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html but it just displays the normal text. Is it possible in ruby on rails to parse or sanitize it in proper format and if so how it can be possible?

<blockquote class="twitter-tweet"><p>Lorewp: lore-der-sdrft: MY NAME IS JOHN <a href="http://t.co/*********">http://t.co/*******</a></p>&mdash; Kofi Jones (@Crazyt2011) <a href="https://twitter.com/Crazyt2011/statuses/3**********">September 12, 2011</a></blockquote> <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
1
  • thanks anyways.. but it worked with the help of html_safe..! Commented Sep 25, 2013 at 5:54

1 Answer 1

1

Use the .html_safe method to display it correctly.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.