Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML formatting Issue

 
Joe Harry
Ranch Hand
Posts: 10106
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a reason why the code below would not show correctly formatted? Here is the HTML that displays the output!



Here is the rendered HTML in the browser!



The exam.description comes from the database with the HTML formatting. A screenshot below shows how it is rendered now!



Screen Shot 2013-12-22 at 9.25.01 AM.png
[Thumbnail for Screen Shot 2013-12-22 at 9.25.01 AM.png]
 
Joe Harry
Ranch Hand
Posts: 10106
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Figured that out! I had to use the @Html(exam.description) and it renders the raw HTML that I wanted!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34195
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad you figured it out. What language is that? (That uses @html)
 
Joe Harry
Ranch Hand
Posts: 10106
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Glad you figured it out. What language is that? (That uses @html)


Sorry not to mention about it. I'm using the Play framework and it is the Play templating language style. I love the idea of passing HTML as function parameters which by the way does justice to a functional programming language like Scala.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic