X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fplugins-dist%2Ftextwheel%2Finc%2Fnotes.php;h=1bddbb6d4a5a97cd0b718e6f2adbd9f2bbef7a7d;hp=d51916e25a3ddb833569daa0b9b17c7abc8c8b7a;hb=122c920eb07e3f665789f8734965b576e6c25515;hpb=226942065cd4f604eb464addf45a065c9e5bc916
diff --git a/www/plugins-dist/textwheel/inc/notes.php b/www/plugins-dist/textwheel/inc/notes.php
index d51916e2..1bddbb6d 100644
--- a/www/plugins-dist/textwheel/inc/notes.php
+++ b/www/plugins-dist/textwheel/inc/notes.php
@@ -3,7 +3,7 @@
/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
- * Copyright (c) 2001-2013 *
+ * Copyright (c) 2001-2014 *
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
@@ -145,11 +145,16 @@ function traiter_raccourci_notes($letexte, $marqueur_notes)
if ($nom) $nom = _NOTES_OUVRE_REF."$nom"._NOTES_FERME_REF;
$pos = strpos($letexte, $note_source);
- $letexte = rtrim(substr($letexte, 0, $pos), ' ')
+
+ // supprimer les ' ' ou 'nbsp;' avant un appel de note
+ $avant = preg_replace(',( | |'.chr(194).chr(160).')+$,S', '', substr($letexte, 0, $pos));
+
+ $letexte = $avant
. code_echappement($nom)
. substr($letexte, $pos + strlen($note_source));
}
+
return array($letexte, $mes_notes);
}
@@ -167,7 +172,7 @@ function traiter_les_notes($notes,$ignorer_autobr) {
. code_echappement($nom
? _NOTES_OUVRE_NOTE."$nom"._NOTES_FERME_NOTE
: '')
- . $texte
+ . trim($texte)
.'';
}
if ($ignorer_autobr)