velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arik Levin <ari...@trendline.co.il>
Subject RE: Html encoding ?
Date Mon, 19 Mar 2001 12:06:27 GMT
I don't know if velocity is prepare to this.. but
you can encode with javascript:

    like this..

        <script>
                    var x = escape("&");
                    unescape(x);
       </script>

-----Original Message-----
From: Eddie [mailto:post2menow@hotmail.com]
Sent: Monday, March 19, 2001 1:51 PM
To: velocity-user@jakarta.apache.org
Subject: Html encoding ?


Hellu,

How do you encode special characters like "&" to proper readable html text
with velocity ??
Does velocity already have a utility for this ? I noticed that velocity
doesn't do this automaticaly.

I have a little class, called WebUtil, with a class method (note: not an
object method) called htmlEncode. How can I use this in my velocity template
?

Regards,
Ed Bras



Mime
View raw message