From 23e5c22248e304973b57d6c699e7d4ee2c285e7b Mon Sep 17 00:00:00 2001
From: Fil <fil@rezo.net>
Date: Fri, 19 Sep 2003 08:19:58 +0000
Subject: [PATCH] le retour de l'apostrophe qui tue

---
 ecrire/inc_texte.php3 | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/ecrire/inc_texte.php3 b/ecrire/inc_texte.php3
index e91ee3116e..a8c060bb7d 100644
--- a/ecrire/inc_texte.php3
+++ b/ecrire/inc_texte.php3
@@ -218,8 +218,8 @@ function echappe_html($letexte,$source) {
 	// Echapper les <a href>
 	//
 
-	$regexp_echap = "<a[[:space:]][^>]+>";
-	//$regexp_echap = "<[^>]+>"; // Echappement tout HTML
+	// $regexp_echap = "<a[[:space:]][^>]+>";
+	$regexp_echap = "<(a|[^>]*')[^>]+>"; // Echappement tout HTML
 	while (eregi($regexp_echap, $letexte, $regs)) {
 		$num_echap++;
 		$les_echap[$num_echap] = $regs[0];
@@ -389,7 +389,7 @@ function typo($letexte) {
 		$letexte = typo_en($letexte);
 
 
-	//$letexte = str_replace("'", "&#146;", $letexte);
+	$letexte = str_replace("'", "&#146;", $letexte);
 
 	$letexte = corriger_caracteres($letexte);
 	$letexte = echappe_retour($letexte, $les_echap, "SOURCETYPO");
@@ -855,6 +855,9 @@ function traiter_raccourcis($letexte, $les_echap = false, $traiter_les_notes = '
 // Filtre a appliquer aux champs du type #TEXTE*
 function propre($letexte) {
 	return interdire_scripts(traiter_raccourcis(trim($letexte)));
+//	$a=time(); $b=microtime();
+//	interdire_scripts(traiter_raccourcis(trim($letexte)));
+//	return time()-$a + microtime()-$b;
 }
 
 ?>
-- 
GitLab