Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/11/2008, 16:17
Avatar de matiassaitam
matiassaitam
 
Fecha de Ingreso: diciembre-2007
Mensajes: 12
Antigüedad: 17 años, 3 meses
Puntos: 0
Pregunta ¿Simil htmlspecialchars / htmlentities en JSP?

Hola,

Estoy haciendo un formulario para agregar comentarios a mi sitio y estaba buscando alguna función equivalente a htmlspecialchars / htmlentities de PHP, sin embargo no he tenido mucho éxito. La idea es que si alguien ingresa un caracter del estilo < > &, etc ... se transformen en entidades html.

Lo único que se me ocurre sino es recorrer cada caracter del texto e ir reemplazándolos a mano, ¿acaso no hay una mejor solución?.

Escucho ofertas

Gracias por su tiempo.
Saludos.