Hi all,

I recently faced an annoying problem with AttributeModifier and encoding of
its model. I have something looking like this in my code:

String url = "http://www.somewhere.com?param1=a&param2=b";;
component.add(new AttributeModifier("href", true, new Model(url)));

After rendering the component looks like this:

<LINK href="http://www.somewhere.com?param1=a&param2=b"/>

My application is not outputting HTML but XML instead and this is obviously
not valid XML (the '&' should be escaped) so I have to manually re-code the
URL.

Since attributes values should always be escaped, shouldn't that be
performed automatically by AttributeModifier ? If not, is there a way to do
this without having to encode the URL in my code ?

Thanks,
Ludovic
-- 
View this message in context: 
http://www.nabble.com/encoding-of-AttributeModifier%27s-model-tf3657412.html#a10218271
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to