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!
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
Post a Comment