I want user to be able to paste their html/css code? eg. from internet.
How to safely display user’s text containing all html/css in rails 3 without security risks and also interfering with site’s html/css (iframe?)
I want user to be able to paste their html/css code? eg. from internet.
Share
Rails (since Rails 3.0) will do this automatically for you. Calling
#html_safeon a string will do the opposite.Edit: There’s a plugin called WhiteList which will do just that.