I need is to display the contents of the list in a snippet.
I have a function like this:
def generateHtml(data: List[Documents]): NodeSeq = {
val html = <ul><li></li></ul>
def css = "li" #> data.map {
document =>
"* *" #> ( document.title + ": " + document.content )
}
css(html)
}
List values have html code like this:
val data: List[Document] = List(Document("<b>title</b> 1", "content 1"),Document("`<b>title</b> 2", "content 2") )
works well because it shows me the list values, but the problem is that it does not interpret the html code (labels <b>)
in my snippet, it shows me something like this:
<b>title</b> 1: content 1
<b>title</b> 2: content 2
but what I need is to interpret the tas b
something like this:
title 1: content 1
title 2: content 2
any suggestion that I can do to interpret the tags
I found a similar problem here: Scala: Parse HTML-fragment
probe with the solutions, but do not work