dépôts
/
lhc
/
web
/
www.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[SPIP] ~maj 3.0.10 --> 3.0.14
[lhc/web/www.git]
/
www
/
plugins-dist
/
textwheel
/
inc
/
notes.php
diff --git
a/www/plugins-dist/textwheel/inc/notes.php
b/www/plugins-dist/textwheel/inc/notes.php
index
d51916e
..
1bddbb6
100644
(file)
--- 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 *
* *
/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
- * Copyright (c) 2001-201
3
*
+ * Copyright (c) 2001-201
4
*
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
* 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."<a href='#nb$ancre' class='spip_note' rel='footnote'$title$att>$nom</a>"._NOTES_FERME_REF;
$pos = strpos($letexte, $note_source);
if ($nom) $nom = _NOTES_OUVRE_REF."<a href='#nb$ancre' class='spip_note' rel='footnote'$title$att>$nom</a>"._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));
}
. code_echappement($nom)
. substr($letexte, $pos + strlen($note_source));
}
+
return array($letexte, $mes_notes);
}
return array($letexte, $mes_notes);
}
@@
-167,7
+172,7
@@
function traiter_les_notes($notes,$ignorer_autobr) {
. code_echappement($nom
? _NOTES_OUVRE_NOTE."<a".$atts.">$nom</a>"._NOTES_FERME_NOTE
: '')
. code_echappement($nom
? _NOTES_OUVRE_NOTE."<a".$atts.">$nom</a>"._NOTES_FERME_NOTE
: '')
- .
$texte
+ .
trim($texte)
.'</div>';
}
if ($ignorer_autobr)
.'</div>';
}
if ($ignorer_autobr)