This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Escape character Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Escape character" Watch "Escape character" New topic
Author

Escape character

Mary Chellapa
Ranch Hand

Joined: Jul 26, 2011
Posts: 93
Hi ,
i need an HTML help

if i have to put this :
between " " in a href ... how will i do it?
what is the escape character i'll have to use \" or ""





Thanks


Mary
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19750
    
  10

The question doesn't make sense, because you're supposed to put a URL into the "href" attribute. That string isn't anything like a URL.
Rufus Addis
Ranch Hand

Joined: Aug 21, 2008
Posts: 83
I'm guessing that the OP is using a custom tag library in a JSP page.

In which case from memory (which is a little rusty) the web application server will look for the defined tag and replace it with the output from the custom tag library.

Therefore to answer the OP's original question, no escaping is required assuming the output from the custom tag library is valid as an href attribute.

i.e.



The application server will replace the bit between the <tttt: and /> with the output from the tag library giving you:



Rufus.
Mary Chellapa
Ranch Hand

Joined: Jul 26, 2011
Posts: 93
Thanks Rufus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Escape character
 
It's not a secret anymore!