From: m4dc4p Date: 2006-01-25T11:03:12+09:00 Subject: Re: Ruby, Web Apps and Cross Site Scripting You got me thinking with that. The ERB solution was too broad, so I looked at the view itself. What about the instance variables? Many times, those are how you are getting information back to the page (either through params or direct copy of instance variables from the controller to the view). My idea was to iterate through the instance variables on the view and, for any tainted ones, override their to_s method so it called CGI::escapeHTML. With a little hacking (and the realization I needed to look inside Hashes and Arrays), I came up with the below. Put an HTML element in the 'name' field and it will tell you what you submitted, properly escaped. Go on - try a