Ah, this is exactly what I'm looking for. Thank you both! -KP
On Sep 1, 10:20 am, David Pollak <[email protected]> wrote: > If you have a String that you know is valid XHTML but don't want to go > through the parsing/unparsing phase: > > import scala.xml._ > > val s: String = .... > > <div>{Unparsed(s)}</div> > > The String will be included in the output stream unchanged. > > > > > > On Mon, Aug 31, 2009 at 11:49 PM, marius d. <[email protected]> wrote: > > > <div> > > {(str.split("\n").map(x => <div>{x}</div>))} > > </div> > > > {x} is an expression that returns a String. Assuming that x is a well- > > formed XML node you could try something like: > > > <div> > > {(str.split("\n").map(x => <div>{XML.loadString(x)}</div>))} > > </div> > > > Br's, > > Marius > > > On Sep 1, 7:24 am, KP <[email protected]> wrote: > > > Hi all. > > > > I have some text I read in from an uploaded file using > > > scala.io.Source. I then have something like > > > > <div> > > > {(str.split("\n").map(x => <div>{x}</div>))} > > > </div> > > > > with str some portion of text from the input file containing HTML > > > formatting tags like <i> or <b>. > > > > Now, characters like < are being escaped to their proper entities > > > <. However, I want these to display as actual HTML (e.g. want > > > <i>foo</i> to be italic). Is there a straightforward way to do this? > > > > (Note that security isn't an issue since this is a feature only admins > > > will be using). > > > > Thanks much. > > > > -KP > > -- > Lift, the simply functional web frameworkhttp://liftweb.net > Beginning Scalahttp://www.apress.com/book/view/1430219890 > Follow me:http://twitter.com/dpp > Git some:http://github.com/dpp --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
