I'm using the stripes framework to realize a web application. In order to avoid all sorts of attacks, text is stored sanitized into the DB and the sanitization process includes encoding of HTML entities.
My problem shows up when I make a form with stripes. When the form starts out empty everything is fine. However, when the user had previously entered something is this form, and that the existing values are fetched from the DB, set in the action bean and then displayed by the stripes form tags, stripes escapes it again. This results in a double escaping of my string.
Is there anyway I can tell stripes that I know what I'm doing and the string I'm giving you is already escaped?
It seems the best solution is just not to use stripes for the problematic fields. If in your jsp you replace, for example :
with
Thenexcept stripes is not called at all to generate the HTML of the second version. Also since in this case we do not use the <c:out> tag, the String is not re-escaped.