[SPIP] ~maj v3.0.14-->v3.0.17
[ptitvelo/web/www.git] / www / ecrire / balise / formulaire_.php
index f552351..631b865 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************************\
  *  SPIP, Systeme de publication pour l'internet                           *
  *                                                                         *
- *  Copyright (c) 2001-2012                                                *
+ *  Copyright (c) 2001-2014                                                *
  *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
  *                                                                         *
  *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
@@ -42,8 +42,10 @@ function protege_champ($texte){
                        AND $texte
                        AND strpbrk($texte, "&\"'<>")!==false
                        ) {
-                               $texte = htmlspecialchars(echappe_retour(echappe_html($texte,'',true),'','proteger_amp'),ENT_QUOTES);
+                               $texte = spip_htmlspecialchars($texte,ENT_QUOTES);
                }
+               elseif(is_bool($texte))
+                       $texte = ($texte?'1':'');
        }
        return $texte;
 }