aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes HTML mailto attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "HTML mailto attribute" Watch "HTML mailto attribute" New topic
Author

HTML mailto attribute

Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Hi,
Is it possible to include special characters in "body" attribute of mailto tag ? "mailto" Tag in a html page is constructed dynamically , it fails when the body text contains special characters like '&' or ". Is there any way to overcome it ?


Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
escape them.

Eric
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Eric,
The problem is the message body is constructed at runtime, so the end users might type any characters. I need to search for all possible special characters in that string and i should escape them..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61417
    
  67

Some code on how you are building the mailto construct might help.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Thanks Eric & Bear, I'm not aware of Escape function in java script. I got it & works now !!
[ January 25, 2006: Message edited by: Srinivasa Raghavan ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTML mailto attribute