Fix: bad regex

This commit is contained in:
Regis Houssin 2009-10-30 18:17:54 +00:00
parent 3f0bc50ca6
commit 0895c21108

View File

@ -344,8 +344,8 @@ function barcode_encode_genbarcode($code,$encoding){
/* delete EAN-13 checksum */
if (preg_match("/^ean$/i", $encoding) && strlen($code)==13) $code=substr($code,0,12);
if (!$encoding) $encoding="ANY";
$encoding=preg_replace("/[|\\]/", "_", $encoding);
$code=preg_replace("/[|\\]/", "_", $code);
$encoding=preg_replace("/[\\\|]/", "_", $encoding);
$code=preg_replace("/[\\\|]/", "_", $code);
$cmd=$genbarcode_loc." \""
.str_replace("\"", "\\\"",$code)."\" \""
.str_replace("\"", "\\\"",strtoupper($encoding))."\"";