From: Platonides Date: Sun, 27 Mar 2011 17:18:52 +0000 (+0000) Subject: Stop after replaceing the first instance X-Git-Tag: 1.31.0-rc.0~31159 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=a051fe15d38914ef3e4fbce8dbc34543b14bd2df;p=lhc%2Fweb%2Fwiklou.git Stop after replaceing the first instance --- diff --git a/includes/DjVuImage.php b/includes/DjVuImage.php index 59f49af68c..7a8b5e4e80 100644 --- a/includes/DjVuImage.php +++ b/includes/DjVuImage.php @@ -270,7 +270,7 @@ class DjVuImage { EOR; $txt = preg_replace_callback( $reg, array( $this, 'pageTextCallback' ), $txt ); $txt = "\n\n\n" . $txt . "\n\n"; - $xml = preg_replace( "//", "", $xml ); + $xml = preg_replace( "//", "", $xml, 1 ); $xml = $xml . $txt. '' ; } }