On Mon, Nov 9, 2009 at 3:54 PM, Damian Krzeminski <[email protected]>wrote:

> Mircea Mihai Carasel wrote:
> > Hi,
> >
> > Working on http://track.sipfoundry.org/browse/XX-6950 I noticed that
> > during XStream serialization '&' character is transformed into &amp;
> > (HTML uses the same symbols to display '&' character) In my chase when
> > gravatar url is written into XML & character is replaced with &amp;
> >
> > However during deserialization  XStream puts in the created Java object
> > the correct character: &
> >
> > Since deserialization works fine, I don't know if this is a XStream bug
> > or not.
> > Anyway I was thinking that is a good think to share this finding with
> > the dev-list :)
> >
>
> It's a feature not a bug ;-)
> Escaping ampersand is exactly what XStream has to do:
>
> http://www.w3.org/TR/xml/#syntax
>
> If you use XStream, dom4l or any other XML aware serialization it happens
> automatically.
> However if you use Velocity template to write out XML it needs to be done
> by calling some kind of Escape method on any string that can contain
> character invalid in XML ('&', '<', '>' etc.)
> D.
>
Thanks
Yeah, I knew about < or >, was not sure about &, but I had the feeling that
this may be a XStream feature :)
BTW, XStream is really nice :)
Mircea

>
> _______________________________________________
> sipx-dev mailing list [email protected]
> List Archive: http://list.sipfoundry.org/archive/sipx-dev
> Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
> sipXecs IP PBX -- http://www.sipfoundry.org/
>
_______________________________________________
sipx-dev mailing list [email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
sipXecs IP PBX -- http://www.sipfoundry.org/

Reply via email to