Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/11/2008, 07:46
Avatar de killerangel
killerangel
 
Fecha de Ingreso: septiembre-2007
Ubicación: Un punto en el espacio
Mensajes: 592
Antigüedad: 16 años, 7 meses
Puntos: 10
no funciona htmlentities

Hola foro:

tengo el problema de conversion de comillas simples y dobles

Código PHP:
$m=$_POST['m'];
echo 
$m;
//'hola' "hola" <img src="http://localhost/col/user/editor/WYSIWYG/images/emoticons/biggrin.gif">

echo '<pre>',$m,'</pre>';
//<pre>'hola' "hola" <img src="http://localhost/col/user/editor/WYSIWYG/images/emoticons/biggrin.gif"><br></pre>

echo htmlentities($m);
//'hola' "hola" &lt;img src="http://localhost/col/user/editor/WYSIWYG/images/emoticons/biggrin.gif"&gt;&lt;br&gt;

echo htmlentities($m,ENT_QUOTES);
//'hola' "hola" &lt;img src="http://localhost/col/user/editor/WYSIWYG/images/emoticons/biggrin.gif"&gt;&lt;br&gt;

echo htmlspecialchars($m);
//'hola' "hola" &lt;img src="http://localhost/col/user/editor/WYSIWYG/images/emoticons/biggrin.gif"&gt;&lt;br&gt;

echo htmlspecialchars($m,ENT_QUOTES);
//'hola' "hola" &lt;img src="http://localhost/col/user/editor/WYSIWYG/images/emoticons/biggrin.gif"&gt;&lt;br&gt; 
entonces no me combierte las comillas ni simples ni dobles a sus correspondientes, que puedo hacer?

gracias
__________________
Sueñen... y trabajen por hacer esos sueños realidad... de eso se construye el futuro!!
Me siento entre la ASP-ada y la PHP-red

Última edición por killerangel; 15/11/2008 a las 07:53