KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have an untrusted string that I want to show as text in an HTML page. I need to escape the chars ' < ' and ' & ' as HTML entities. The less fuss the better. I'm using UTF8 and don't need other entities for accented letters. Is there a built-in function in Ruby or Rails, or should I roll my own?
Tags (comma-separated)
Save Edits
Cancel