[Lift] Re: XML unescaping

2009-03-17 Thread Derek Chen-Becker
Glad someone caught it :) On Tue, Mar 17, 2009 at 2:32 AM, TylerWeir wrote: > > > scala> val title = "Catsby & Twisp" > > +1 for the Penny Arcade reference. > > On Mar 16, 8:51 am, Derek Chen-Becker wrote: > > Well, it may be that the XML output portion of Scala is escaping your > > ampersands

[Lift] Re: XML unescaping

2009-03-17 Thread TylerWeir
> scala> val title = "Catsby & Twisp" +1 for the Penny Arcade reference. On Mar 16, 8:51 am, Derek Chen-Becker wrote: > Well, it may be that the XML output portion of Scala is escaping your > ampersands a second time. For instance, check out this session in the > interpreter: > > scala> val tit

[Lift] Re: XML unescaping

2009-03-17 Thread Jeremy Mawson
Thanks David. 2009/3/17 David Pollak > > > On Mon, Mar 16, 2009 at 8:51 PM, Jeremy Mawson < > jeremy.mawson.w...@gmail.com> wrote: > >> Thanks Marc. works nicely. >> >> For this exercise this is hypothetical, but it matches very closely a >> project I have enabled in the past using struts and

[Lift] Re: XML unescaping

2009-03-16 Thread Marc Boschma
To quote David from a previous thread on the mailing list: > I've enhanced LiftRules as follows: > > /** > * A partial function that determines content type based on an > incoming > * RequestState and Accept header > */ > var determineContentType: > PartialFunction[(Can[RequestState], Can[

[Lift] Re: XML unescaping

2009-03-16 Thread David Pollak
On Mon, Mar 16, 2009 at 8:51 PM, Jeremy Mawson wrote: > Thanks Marc. works nicely. > > For this exercise this is hypothetical, but it matches very closely a > project I have enabled in the past using struts and JIBX... > > Say the data was sourced from an external party's service and there was

[Lift] Re: XML unescaping

2009-03-16 Thread Jeremy Mawson
Thanks Marc. works nicely. For this exercise this is hypothetical, but it matches very closely a project I have enabled in the past using struts and JIBX... Say the data was sourced from an external party's service and there was a contractual agreement to not alter the data in any way? I.E. I'm

[Lift] Re: XML unescaping

2009-03-16 Thread Marc Boschma
On 17/03/2009, at 12:36 PM, Jeremy Mawson wrote: > If I change the line to "description" -> > {Unparsed(result.description)}, it compiles but I have > an unwanted span tag and worse ... if result.description is not well > formed XML my page will fail to render! Firefox complains of an XML

[Lift] Re: XML unescaping

2009-03-16 Thread Jeremy Mawson
Thanks Derek. Familiarity with the APIs is one of the tricks when moving to a new language I guess. This worked for me, but I have a follow-on issue. Just as a background I am rendering search results which are provided as XML. Here's my binding code: result => bind("entry", chooseTemplate

[Lift] Re: XML unescaping

2009-03-16 Thread Derek Chen-Becker
Well, it may be that the XML output portion of Scala is escaping your ampersands a second time. For instance, check out this session in the interpreter: scala> val title = "Catsby & Twisp" title: java.lang.String = Catsby & Twisp scala> val escaped = {title} escaped: scala.xml.Elem = Catsby &