> > You can also try > > import cgi > db.table.field.filter_in = lambda text: cgi.escape(text) #1 > > db.table.field.filter_out = lambda text: XML(text) #2 >
Hi Massimo, thanks for your reply. filter_out sounds like it could be an even more elegant way of achieving this. However I tested option 2 (placed code in model file, even restarted server for good luck) but it doesn't seem to have any effect (with version 2.0.6). The output is still escaped. filter_out is definitely working, because: db.table.field.filter_out = lambda text: text + 'xxx' has the desired effect, however the XML function doesn't do anything. I'll delve into it in more detail tomorrow and look into the source as I see the filter_ options are new to 2.0. --