« Si vous n'avez pas besoin de règles de remplacement compliquées, utilisez
cette fonction de préférence à ereg_replace() et preg_replace(). »
http://fr.php.net/manual/fr/function.str-replace.php
diff -u ecrire/plugins/plug_small_caps.php
--- ecrire/plugins/plug_small_caps.php Mon Oct 18 16:13:06 2004
+++ ecrire/plugins/plug_small_caps.php Mon Oct 18 22:02:40 2004
@@ -2,8 +2,8 @@
// Ce plug-in ajoute le raccourci typographique <sc></sc>
function avant_typo_smallcaps($texte) {
- $texte = ereg_replace("<sc>", "<span style=\"font-variant: small-caps\">", $texte);
- $texte = ereg_replace("</sc>", "</span>", $texte);
+ $texte = str_replace("<sc>", "<span style=\"font-variant: small-caps\">", $texte);
+ $texte = str_replace("</sc>", "</span>", $texte);
return $texte;
}