javascript - Sanitizing CSS in Rails -


I am creating a web app's users to write their own CSS to customize their profiles. Page.

However, I know about this security with many security risks, i.e. background: url ('javascript: alert ("your cookies are found!" + Document.cookies').

So, I am allowing CSS as much functionality as possible for my users, I am looking for a solution to clean CSS.

So what are my questions that someone To understand this thing, a gem or plugin bar Do I know? I have already excluded my mind so any suggestions would be really appreciated!

"post-text" itemprop = "text">

See

in CSS Sanitizer

  & gt; Action Controller :: Base .helpers.sanitize_css ('background: #fff') = & gt; Background: #FFF; "Action Controller :: Base.holder. sanitize_css ('JavaScript: Alert (' '' '') = ' / Html> 

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -