• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

HTML formatting Issue

 
Ranch Hand
Posts: 10191
3
Mac PPC Eclipse IDE 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: 10191
3
Mac PPC Eclipse IDE 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!
 
author & internet detective
Posts: 39574
781
Eclipse IDE VI Editor Java
  • 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: 10191
3
Mac PPC Eclipse IDE 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.
 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!