title: Sanitizing user input for a message box
body: <p>I am developing a crypto-related application and since those people who deal in crypto will always try some sort of scam or script kiddie "hack" I'd like to figure out the best way to clean up content in user-to-user chat boxes and comments fields.</p>
  
  <p>I don't want any HTML/CSS/JS in there.</p>
  
  <p>I want to leave email addresses, URLs, phone numbers and "normal" text untouched.</p>
  
  <p>Right now I am doing a <code>.gsub(/[^0-9a-zA-Z\@\;\:\-\_\,\.\ ]/i, '')</code> before_save but it removes the newlines.</p>
  
  <p>I tried adding <code>.gsub(/[^0-9a-zA-Z\R\@\;\:\-\_\,\.\ ]/i, '')</code> to make it leave newlines alone but it does not seem to work.</p>
  
  <p>Would prefer not having to add any gems.</p>