Join Up!
97636 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previoushtmlentitiesimplodenext
Last updated: Tue, 29 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | Finnish | German

htmlspecialchars

(PHP 3, PHP 4 )

htmlspecialchars --  Convierte caracteres especiales a entidades HTML

Descripción

string htmlspecialchars ( string cadena)

Ciertos caracteres tienen significados especiales en HTML, y deben ser representados por entidades HTML si se desea preservar su significado. Esta función devuelve una cadena con dichas conversiones realizadas.

Esta función es útil para evitar que el texo entrado por el usuario contenga marcas HTML, como ocurre en aplicaciones de foros o libros de visita.

Actualmente, las traducciones hechas son:

  • '&' (ampersand) se convierte en '&'

  • '"' (doble comilla) se convierte en '"'

  • '<' (menor que) se convierte en '&lt;'

  • '>' (mayor que) se convierte en '&gt;'

Nótese que esta función no traduce nada más que lo mostrado más arriba. Para una traducción de entidades completa, vea htmlentities().

Vea también htmlentities() y nl2br().

User Contributed Notes
htmlspecialchars
add a note about notes
There are no user contributed notes for this page.
previoushtmlentitiesimplodenext
Last updated: Tue, 29 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST