Nope. 2 different things.

Filip Hanik wrote:
encoding a URL is not the same as encoding HTML, or is it?
----- Original Message -----
From: "Andy Eastham" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, October 02, 2003 2:55 PM
Subject: RE: HTML quoting


Greg,


"Standard" one is java.net.URLEncoder.encode() and
java.net.URLEncoder.decode()

Andy


-----Original Message-----
From: David Rees [mailto:[EMAIL PROTECTED]
Sent: 02 October 2003 22:25
To: Tomcat Users List
Subject: Re: HTML quoting


On Thu, October 2, 2003 at 2:18 pm, Greg Ward sent the following


What's the standard way of quoting text for inclusion in a web page in
Java?  Ie. I need a method to convert the string

Jeb said, "Hell & damnation! Is 5 > 4?"

to

Jeb said, "Hell & damnation! Is 5 > 4?"

(I think: I've never been entirely sure what the right way to handle
quotes is.)  That is, I want the standard Java equivalent of Python's
cgi.escape(), or Perl's CGI::escapeHTML().

I am not aware of a standard utility for doing so, I have written my own utility class which escapes data for encapsulation in XML/HTML. I am sure that one exists out there somewhere, though.

-Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to