[seam-dev] @WebSafe annotation
Shane Bryzak
sbryzak at redhat.com
Sun Jun 12 01:06:13 EDT 2011
Looks good, although I wouldn't hard code Whitelist.basic() as the
default... instead I would make Whitelist.relaxed() the default, and
then perhaps allow the developer to override it by specifying an enum
value for the validation level allowed on the @WebSafe annotation. E.g:
// Default would use Whitelist.relaxed()
private @WebSafe String content;
// This would use the basic whitelist
private @WebSafe(basic) String content;
// Basic whitelist plus images
private @WebSafe(basicWithImages) String content;
It would even be nice to somehow allow the developer to specify their
own whitelist, if you can work out an elegant way to implement it.
On 12/06/11 12:46, George Gastaldi wrote:
> Hey Shane,
>
> I implemented the @WebSafe annotation you mentioned on Hibenate Validator.
> The pull request is https://github.com/hibernate/hibernate-validator/pull/61
>
> Regards,
>
> George Gastaldi
More information about the seam-dev
mailing list