• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

unescaping back to html

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This has to be fairly simple, and I'm apparently beating my head into the wrong wall.
I've have text that I've stored into a database, which includes html tags, div statements mostly. Retrieving the text is where I have a problem, in that I want the unicode version of those tags to be shoved to the browser, so those tags can be interpreted by the rendering engine and displayed. What is happening now is I get escape sequences in the markup, and the actual tag is displayed as plain text.
I've tried to replace those sequences using the Apache Commons StringUtils.replace method, the EscapeUtils escape methods, etc. How does everyone else do this?
Thanks, Paul
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there
Recently I had a similar problem. In the database I had a record with double quotes, I retrieved it and in the jsp I had " What I did was to use a StringTokenizer...

I don't know if this could help you out, but at least I hope it shows you the way. Good Luck!
 
Paul Woods
Greenhorn
Posts: 23
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Incase anyone else has a similiar issue; Part of my problem was that the <nested:write (bean:write) tag I was using to write to the JSP has a filter attribute, defaulted to true, which automatically escapes any html characters so that they are displayed in a readable form to the user. After setting that to false, I'm back in business, and the browser is allowed to interpret those tags as actual html.
 
reply
    Bookmark Topic Watch Topic
  • New Topic