Skip to content
Snippets Groups Projects
Commit 0895c211 authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: bad regex

parent 3f0bc50c
No related branches found
No related tags found
No related merge requests found
......@@ -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))."\"";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment