/***************************************************************************\
* 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. *
$t = preg_replace(',(&#?[0-9a-z]+)~;,iS', '$1;', $t);
}
- /* 2 */
- $t = preg_replace('/»| --?,|(?::(?!:)| %)(?:\W|$)/S', '~$0', $t);
+ /* 2 ; ajout d'insecable */
+ $t = preg_replace('/»| --?,|(?::| %)(?:\W|$)/S', '~$0', $t);
+
+ // {ยป} guillemet en italiques : ne pas doubler l'insecable
+ $t = str_replace('~{~', '~{', $t);
+ $t = str_replace('~}~', '}~', $t);
+
/* 3 */
$t = preg_replace('/[!?][!?\.]*/S', "$pro~$0", $t, -1, $c);
$t = str_replace($pro, '', $t);
}
- $t = preg_replace(',(https?|ftp|mailto)~((://[^"\'\s\[\]\}\)<>]+)~([?]))?,S', '$1$3$4', $t);
+ $t = preg_replace(',(' ._PROTOCOLES_STD . ')~((://[^"\'\s\[\]\}\)<>]+)~([?]))?,S', '$1$3$4', $t);
$t = str_replace('~', ' ', $t);
return $t;