Is there a utility function that I can use to escape string values so that they can be used as values in an HTML form?

E.g: "Barnes & Nobles" would be used as the value of an HTML TextArea

<TEXTAREA NAME="txt">Barnes & Nobles</TEXTAREA>

Java provides a function to encode URLs but I could't find a similar function that can be used to encode form contents.


Thanks,

Frederic