From 3b1a3a24d47475caf3b9d4be818caa46a303f51e Mon Sep 17 00:00:00 2001
From: Antoine Pitrou <pitrou@free.fr>
Date: Fri, 29 Aug 2003 19:25:21 +0000
Subject: [PATCH] bugs

---
 ecrire/inc_barre.php3   |  2 +-
 ecrire/inc_version.php3 |  2 +-
 spip_barre.js           | 20 ++++++++++----------
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/ecrire/inc_barre.php3 b/ecrire/inc_barre.php3
index dab8eb642c..ba4a7520e3 100644
--- a/ecrire/inc_barre.php3
+++ b/ecrire/inc_barre.php3
@@ -92,7 +92,7 @@ function afficher_barre($formulaire='',$texte='', $forum=false) {
 		$ret .= "<td align='center'>";
 		$col++;
 		if ($spip_lang == "fr") {
-			$ret .= bouton_barre_racc ("javascript:barre_raccourci('&laquo;','&raquo;',$champ)", "barre-guillemets.png", "InsŽrer des &laquo; guillemets fran&ccedil;ais &raquo;", $formulaire, $texte);
+			$ret .= bouton_barre_racc ("javascript:barre_raccourci('&laquo;','&raquo;',$champ)", "barre-guillemets.png", "Ins&eacute;rer des &laquo; guillemets fran&ccedil;ais &raquo;", $formulaire, $texte);
 			$ret .= "&nbsp;&nbsp;&nbsp;";
 			$ret .= bouton_barre_racc ("javascript:barre_inserer('&OElig;',$champ)", "barre-oe-maj.png", "Ins&eacute;rer un E-dans-l-O majuscule", $formulaire, $texte);
 			$ret .= bouton_barre_racc ("javascript:barre_inserer('&oelig;',$champ)", "barre-oe.png", "Ins&eacute;rer un E-dans-l-O", $formulaire, $texte);
diff --git a/ecrire/inc_version.php3 b/ecrire/inc_version.php3
index 2a7c6283c2..0afc6d81c7 100644
--- a/ecrire/inc_version.php3
+++ b/ecrire/inc_version.php3
@@ -830,7 +830,7 @@ function verif_butineur() {
 		if (ereg("rv:([0-9]+\.[0-9]+)", $browser_description, $match))
 			$browser_rev = doubleval($match[1]);
 		// Autres Gecko => equivalents 1.4 par defaut (Galeon, etc.)
-		else if (strpos($browser_description, "Gecko"))
+		else if (strpos($browser_description, "Gecko") and !strpos($browser_description, "KHTML"))
 			$browser_rev = 1.4;
 		// Machins quelconques => equivalents 1.0 par defaut (Konqueror, etc.)
 		else $browser_rev = 1.0;
diff --git a/spip_barre.js b/spip_barre.js
index 22459968b1..e37008ce86 100644
--- a/spip_barre.js
+++ b/spip_barre.js
@@ -27,26 +27,26 @@ function barre_raccourci(debut,fin,champ) {
 	donotinsert = false;
 	theSelection = false;
 	bblast = 0;
-	
+
 	if ((clientVer >= 4) && is_ie && is_win)
 	{
 		theSelection = document.selection.createRange().text; // Get text selection
 		if (theSelection) {
-		
-			if (theSelection.substring(theSelection.length-1, theSelection.length) == ' ') 
-			{	
+
+			while (theSelection.substring(theSelection.length-1, theSelection.length) == ' ')
+			{
 				theSelection = theSelection.substring(0, theSelection.length-1);
 				fin = fin + " ";
 			}
-			if (theSelection.substring(0,1) == '{' && debut.substring(0,1) == '{') 
-			{	
+			if (theSelection.substring(0,1) == '{' && debut.substring(0,1) == '{')
+			{
 				debut = debut + " ";
 			}
-			if (theSelection.substring(theSelection.length-1, theSelection.length) == '}' && fin.substring(0,1) == '}') 
-			{	
+			if (theSelection.substring(theSelection.length-1, theSelection.length) == '}' && fin.substring(0,1) == '}')
+			{
 				fin = " " + fin;
 			}
-			
+
 			// Add tags around selection
 			document.selection.createRange().text = debut + theSelection + fin;
 			txtarea.focus();
@@ -63,7 +63,7 @@ function barre_raccourci(debut,fin,champ) {
 
 function barre_demande(debut,milieu,fin,affich,champ) {
 	var inserer = prompt(affich);
-	
+
 	if (inserer != null) {
 		if (inserer == "") {inserer = "xxx"; }
 
-- 
GitLab