Re: [Wicket-user] encoding of AttributeModifier's model
I faced this with version 1.2.6 but could reproduce it as well with a fresh build I made from 1.3 in svn's trunk. So I've opened a JIRA issue as you asked: https://issues.apache.org/jira/browse/WICKET-517 Merci, Ludovic Jean-Baptiste Quenot-3 wrote: > > * Ludovic Orban: >> >> 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¶m2=b";; >> component.add(new AttributeModifier("href", true, new Model(url))); > > Please specify which Wicket version you are using. > > If this issue can also be reproduced on the latest and greatest > Wicket (trunk, 1.3) would you be kind enough to open a JIRA issue? > > Thanks in advance, > -- > Jean-Baptiste Quenot > aka John Banana Qwerty > http://caraldi.com/jbq/ > > -- View this message in context: http://www.nabble.com/encoding-of-AttributeModifier%27s-model-tf3657412.html#a10233943 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
Re: [Wicket-user] encoding of AttributeModifier's model
* Ludovic Orban: > > 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¶m2=b";; > component.add(new AttributeModifier("href", true, new Model(url))); Please specify which Wicket version you are using. If this issue can also be reproduced on the latest and greatest Wicket (trunk, 1.3) would you be kind enough to open a JIRA issue? Thanks in advance, -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - 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
Re: [Wicket-user] encoding of AttributeModifier's model
i dont know if it should be done all the time. but what you can do is write a XmlSafeModel that escapes the string, and use that in your attrib modifier. -igor On 4/27/07, Ludovic Orban <[EMAIL PROTECTED]> wrote: 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¶m2=b";; component.add(new AttributeModifier("href", true, new Model(url))); After rendering the component looks like this: http://www.somewhere.com?param1=a¶m2=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 - 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
[Wicket-user] encoding of AttributeModifier's model
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¶m2=b";; component.add(new AttributeModifier("href", true, new Model(url))); After rendering the component looks like this: http://www.somewhere.com?param1=a¶m2=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