Possible Duplicate:
Recommended method for escaping HTML in Java
Replace characters with HTML entities in java
I have some java code which writes text including angle-brackets to a DB; this text is displayed on a web-page.
Rather than change my java code to be full of entity codes, I wondered if I can keep the constants like "<test>
" and use a standard library function to generate the entity-based string "<test>
"?