Displaying 1 result from an estimated 1 matches for "comment_html".
2008 Feb 01
4
How to sanitize _before_ going into the database?
I use a call to the sanitize method every time I render some user
input, but it would be much nicer if I could clean it up once before
putting it into the database and avoid having to call the (relatively
expensive) sanitize every time I render a page.
My first thought was to just add something like:
def message=(x)
self[:message]=sanitize(x)
end
However, the sanitize helper cannot be called