When to encode as HTML in Grails -


i see grails sample code programmer has called method called encodeashtml(). figure should use in grails applications (for security reasons, assume?), wondering when should use method. objects/properties/etc. candidates encodeashtml() method?

thank you!

use encodeashtml() (or encodeasjavascript, etc) you've got user. every string modified user (got input form, request parameter, external api call, etc)

see also:


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

What is the difference between data design and data model(ERD) -

ios - Can NSManagedObject conform to NSCoding -