Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

set "<div class='urg5'>High</div>" in JTSL

 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to set the value in JTSL to
<td><div class='urg5'>High</div></td>
if input[6] == 'checked'

This does not work:

However, the web page displays
<td>& lt;div class=& #039;urg5& #039;& gt;High& lt;/div& gt;</td>
i.e. special characters "& lt ;", "& gt ;", "& # 039;", ... appear instead of "<", ">", "'", ....

Please help.
Thanks.
 
Marshal
Posts: 67417
173
Mac Mac OS X IntelliJ IDE jQuery Java
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseAMeaningfulSubjectLine when posting. Explaining your question or remark briefly on the subject line allows us to know what we are getting into, and if we will be able to help. Taking the time to compose a useful subject line shows that you care enough about your question to ShowSomeEffort when asking it here.

You can edit your post to fix the subject line by using the button.
 
albert kao
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to set the value to
<td><div class='urg5'>High</div></td>
in JTSL.

I tried


Page source of the JSP web page is


i.e. special characters appear.

instead of

 
Bear Bibeault
Marshal
Posts: 67417
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sigh. Only put code in code tags. Your text should not be in code tags.

Making your posts hard to read is not going to get you much help.

Also, learn to use the Disable HTML and Disable smilies checkboxes when posting.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
c:out has an escape attribute, no?
 
albert kao
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

David Newton wrote:c:out has an escape attribute, no?



Thanks for the info!
The code should be
 
Paper jam tastes about as you would expect. Try some on this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic