protected Object [ ] escape ( final Format format , Object ... args ) { // Transformer that escapes HTML,XML,JSON strings Transformer < Object , Object > escapingTransformer = new Transformer < Object , Object > ( ) { @ Override public Object transform ( Object object ) { return format . escapeValue ( object ) ; } } ; List < Object > list = Arrays . asList ( ArrayUtils . clone ( args ) ) ; CollectionUtils . transform ( list , escapingTransformer ) ; return list . toArray ( ) ; }
Escapes args string values according to format