Displaying 2 results from an estimated 2 matches for "sanitize_css".
2006 May 11
3
sanitize dangers
I''ve noticed that it is possible to pass javascript unaltered through
the sanitize function using CSS. For example:
sanitize( "<style
type=''text/css''>body{background-image:url(''javascript:window.alert(1)'')
}</style>" )
IE will execute the javascript. Firefox will not. I haven''t tried it
with any other browsers.
2007 Nov 29
27
Strip & Sanitize BEFORE saving data
So I''ve googled my brains out, and I see a lot of talk about
TextHelper for views, but next to no discussion about cleaning text
_before_ it is saved.
I figured this had to be asked 4 zillion times, but I''m not finding
anything concrete/obvious.
Using h is fine as a safety catch, but that alone is not acceptable
to me as the means of diffusing the impact of HTML or JS