diff --git a/article.php3 b/article.php3
index 06549675be810cb0a53d9b013523d5f6941edf50..743516a7afd7fb374a4a3972d9b62e887e0f0304 100644
--- a/article.php3
+++ b/article.php3
@@ -2,7 +2,7 @@
 
 $fond = "article";
 $delais = 24 * 3600;
-$xhtml = true;
+
 include ("inc-public.php3");
 
 ?>
diff --git a/ecrire/inc_texte.php3 b/ecrire/inc_texte.php3
index b02cf43e322853935188f4bdb7fdfaabb7973194..1f0963f750f36900a3c672a96d0a4caace5bffe3 100644
--- a/ecrire/inc_texte.php3
+++ b/ecrire/inc_texte.php3
@@ -865,7 +865,7 @@ function traiter_raccourcis($letexte, $les_echap = false, $traiter_les_notes = '
 		$textTable = substr($letexte, $tableBeginPos + 2, $tableEndPos - $tableBeginPos);
 		$textEnd = substr($letexte, $tableEndPos + 3);
 
-		$newTextTable = "\n<p><table class=\"spip\">";
+		$newTextTable = "\n\n<table class=\"spip\">";
 		$rowId = 0;
 		$lineEnd = strpos($textTable, "|\n");
 		while (is_integer($lineEnd)) {
@@ -881,7 +881,7 @@ function traiter_raccourcis($letexte, $les_echap = false, $traiter_les_notes = '
 			$newTextTable .= '</tr>';
 			$lineEnd = strpos($textTable, "|\n");
 		}
-		$newTextTable .= "</table>\n<p>\n";
+		$newTextTable .= "</table>\n\n";
 
 		$letexte = $textBegin . $newTextTable . $textEnd;
 
@@ -965,8 +965,8 @@ function traiter_raccourcis($letexte, $les_echap = false, $traiter_les_notes = '
 			/* 12 */	"<p class=\"spip\">",
 			/* 13 */	"<p class=\"spip\">",
 			/* 14 		" ", */
-			/* 15 */	"<blockquote class=\"spip\">",
-			/* 16 */	"</blockquote>"
+			/* 15 */	"\n\n<blockquote class=\"spip\"><p class=\"spip\">",
+			/* 16 */	"</p></blockquote>\n\n"
 		);
 		$letexte = ereg_remplace($cherche1, $remplace1, $letexte);
 		$letexte = preg_replace("@^ <br />@", "", $letexte);
@@ -976,10 +976,16 @@ function traiter_raccourcis($letexte, $les_echap = false, $traiter_les_notes = '
 	if (strpos(' '.$letexte, '<p class="spip">'))
 		$letexte = '<p class="spip">'.str_replace('<p class="spip">', "</p>\n".'<p class="spip">', $letexte).'</p>';
 
-	// intertitres & hr compliants
+	// intertitres / hr / blockquote / table / ul compliants
 	$letexte = ereg_replace('(<p class="spip">)?[[:space:]]*@@SPIP_debut_intertitre@@', $debut_intertitre, $letexte);
 	$letexte = ereg_replace('@@SPIP_fin_intertitre@@[[:space:]]*(</p>)?', $fin_intertitre, $letexte);
 	$letexte = ereg_replace('(<p class="spip">)?[[:space:]]*@@SPIP_ligne_horizontale@@[[:space:]]*(</p>)?', $ligne_horizontale, $letexte);
+	$letexte = ereg_replace('(<p class="spip">)?[[:space:]]*<blockquote class=\"spip\"></p>', "<blockquote class=\"spip\">", $letexte);
+	$letexte = ereg_replace('</blockquote>[[:space:]]*(</p>)?', '</blockquote>', $letexte);
+	$letexte = ereg_replace('(<p class="spip">)?[[:space:]]*<table', "<table", $letexte);
+	$letexte = ereg_replace('</table>[[:space:]]*(</p>)?', '</table>', $letexte);
+	$letexte = ereg_replace('(<p class="spip">)?[[:space:]]*<ul', "<ul", $letexte);
+	$letexte = ereg_replace('</ul>[[:space:]]*(</p>)?', '</ul>', $letexte);
 
 	// Appeler la fonction de post-traitement
 	$letexte = spip_apres_propre ($letexte);
diff --git a/ecrire/inc_tidy.php b/ecrire/inc_tidy.php
index 3633e05976728e3e1aaee9a84e4ce50206bee1a1..3337c09ee8bb9d7c75218cd03057583305d84491 100644
--- a/ecrire/inc_tidy.php
+++ b/ecrire/inc_tidy.php
@@ -21,7 +21,7 @@ function version_tidy() {
 
 function echappe_xhtml ($letexte) { // oui, c'est dingue... on echappe le mathml
 	$regexp_echap_math = "/<math((.*?))<\/math>/si";
-	$source = "mathml";
+	$source = "xhtml";
 
 	while (preg_match($regexp_echap_math, $letexte, $regs)) {
 		$num_echap++;
@@ -33,6 +33,20 @@ function echappe_xhtml ($letexte) { // oui, c'est dingue... on echappe le mathml
 			.substr($letexte,$pos+strlen($regs[0]));
 	}
 	
+	// et les textarea
+	$regexp_echap_cadre = "/<textarea((.*?))<\/textarea>/si";
+	$source = "xhtml";
+
+	while (preg_match($regexp_echap_cadre, $letexte, $regs)) {
+		$num_echap++;
+		
+		$les_echap[$num_echap] = $regs[0];
+
+		$pos = strpos($letexte, $regs[0]);
+		$letexte = substr($letexte,0,$pos)."@@SPIP_$source$num_echap@@"
+			.substr($letexte,$pos+strlen($regs[0]));
+	}
+	
 	return array($letexte, $les_echap);
 }
 
@@ -57,7 +71,7 @@ function xhtml ($buffer) {
 		$html = tidy_parse_string($buffer);
 	    tidy_clean_repair();
 	    $tidy = tidy_get_output();
-	    $tidy = echappe_retour($tidy, $les_echap, "mathml");
+	    $tidy = echappe_retour($tidy, $les_echap, "xhtml");
 		return $tidy;
 	}
 	else if (version_tidy() == "2") {
@@ -93,7 +107,7 @@ function xhtml_nettoyer_chaine ($buffer) {
 		$html = tidy_parse_string($buffer);
 	    tidy_clean_repair();
 	    $tidy = tidy_get_output();
-	    $tidy = echappe_retour($tidy, $les_echap, "mathml");
+	    $tidy = echappe_retour($tidy, $les_echap, "xhtml");
 		return $tidy;
 	}
 	else if (version_tidy() == "2") {
diff --git a/ecrire/spip_style.php3 b/ecrire/spip_style.php3
index 6850462329a9588ea106bcd50d49803c86d0a6a2..ad74890eb9cfb96a6595f652d01b6f933097c2c9 100644
--- a/ecrire/spip_style.php3
+++ b/ecrire/spip_style.php3
@@ -1083,6 +1083,7 @@ a.spip_glossaire:hover {text-decoration: underline overline;}
 .spip_cadre {
 	width : 100%;
 	background-color: #eeeeee;
+	margin-top: 10px;
 	padding: 5px;
 	border: 1px solid #666666;
 	behavior: url("win_width.htc");
@@ -1094,7 +1095,8 @@ blockquote.spip {
 	margin-bottom : 10px;
 	border : solid 1px #aaaaaa;
 	background-color: #ffffff;
-	padding: 5px;
+	padding-left: 10px;
+	padding-right: 10px;
 }
 
 div.spip_poesie {
diff --git a/spip_style.css b/spip_style.css
index 6f9e9bfee3e454657092640f2529def6ce9b9249..f5ad9d234853a4defc314697184687b19da76db5 100644
--- a/spip_style.css
+++ b/spip_style.css
@@ -67,23 +67,25 @@ blockquote.spip {
 	margin-right: 0px;
 	border : solid 1px #aaaaaa;
 	background-color: #ffffff;
-	padding: 5px;
+	padding-left: 10px;
+	padding-right: 10px;
 }
 
 .forml { width: 100% ; background-color: #FFDDAA;}
 
 .spip_encadrer {
 	font-family: helvetica, arial, sans-serif;
-	width : 100%;
+	width : 95%;
 	background-color: #FFFFFF;
 	padding: 5px;
 	border: 1px #666666 solid;
 }
 
 .spip_cadre {
-	width : 100%;
+	width : 95%;
 	background-color: #FFFFFF;
 	padding: 5px;
+	margin-top: 10px;
 }
 
 div.spip_poesie {
@@ -97,7 +99,6 @@ div.spip_poesie div {
 	margin-left: 60px;
 }
 
-
 .spip_bouton { background-color: #FFCC00;}
 
 .formrecherche { width: 100% ; background-color: #FFDDAA;}