Forum: Ruby on Rails Escaping Data to Prevent XSS When It Gets Stored

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
mh (Guest)
on 2007-07-23 23:37
(Received via mailing list)
It seems to me that escaping data about to appear in a view in an
rhtml template using h / html_escape is further downstream than you
really want to be escaping certain data.  Wouldn't it make more sense
to escape data *before* you store it in the database?  This way any
code that subsequently picks up the data doesn't have to worry,
correct?  Has anyone done this?  Is there a reason you *wouldn't* want
to escape the data prior storage?
This topic is locked and can not be replied to.