I'm running Rails 4.2.x and I have the following problem.
The <title> of some pages are generated from user content. So I have to use the sanitize Rails helpers to properly clean it up.
But if the user writes something like "A & B", the title shown in browser is A & B which is wrong.
What's the correct way of escaping user content on the <title> tag using Rails? At least some special characters should be included...
 
     
     
    