diff --git a/ecrire/inc_barre.php3 b/ecrire/inc_barre.php3 index dab8eb642c04450a67c9d7e8a6af48a4e9a69c61..ba4a7520e3adfc19a04aa0d41f14e96e5c754b10 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('«','»',$champ)", "barre-guillemets.png", "InsŽrer des « guillemets français »", $formulaire, $texte); + $ret .= bouton_barre_racc ("javascript:barre_raccourci('«','»',$champ)", "barre-guillemets.png", "Insérer des « guillemets français »", $formulaire, $texte); $ret .= " "; $ret .= bouton_barre_racc ("javascript:barre_inserer('Œ',$champ)", "barre-oe-maj.png", "Insérer un E-dans-l-O majuscule", $formulaire, $texte); $ret .= bouton_barre_racc ("javascript:barre_inserer('œ',$champ)", "barre-oe.png", "Insérer un E-dans-l-O", $formulaire, $texte); diff --git a/ecrire/inc_version.php3 b/ecrire/inc_version.php3 index 2a7c6283c22405ce74d192dc8f7786e2afee5ec0..0afc6d81c70c340429b053135cff85eab4e96f62 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 22459968b1a886152203ee6bd5f2a71700e878e4..e37008ce86e26e07b80632c05d895892fd541f83 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"; }