This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes HTML formatting Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "HTML formatting Issue" Watch "HTML formatting Issue" New topic
Author

HTML formatting Issue

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9953
    
    3

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]


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9953
    
    3

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

Joined: May 26, 2003
Posts: 32481
    
214

Glad you figured it out. What language is that? (That uses @html)


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9953
    
    3

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.
 
Have you checked out Aspose?
 
subject: HTML formatting Issue
 
It's not a secret anymore!