Suppose I have the following string
@x = \"Turn me into a link\"
In my view, I want a link to be displayed.
The best safe way is: <%= sanitize @x %>
<%= sanitize @x %>
It will avoid XSS!