diff --git a/library/Businessprocess/Storage/LegacyConfigParser.php b/library/Businessprocess/Storage/LegacyConfigParser.php index 10cfe7b..4293b1e 100644 --- a/library/Businessprocess/Storage/LegacyConfigParser.php +++ b/library/Businessprocess/Storage/LegacyConfigParser.php @@ -301,7 +301,7 @@ class LegacyConfigParser } $op = '&'; - if (preg_match_all('~([\|\+&\!])~', $value, $m)) { + if (preg_match_all('~(?setBpConfig($bp); - $cmps = preg_split('~\s*\\' . $op . '\s*~', $value, -1, PREG_SPLIT_NO_EMPTY); + $cmps = preg_split('~\s*(?hasNode($val)) { $node->addChild($bp->getNode($val)); diff --git a/library/Businessprocess/Storage/LegacyConfigRenderer.php b/library/Businessprocess/Storage/LegacyConfigRenderer.php index d90db95..77a1d13 100644 --- a/library/Businessprocess/Storage/LegacyConfigRenderer.php +++ b/library/Businessprocess/Storage/LegacyConfigRenderer.php @@ -184,7 +184,9 @@ class LegacyConfigRenderer { $op = static::renderOperator($node); $children = $node->getChildNames(); - $str = implode(' ' . $op . ' ', $children); + $str = implode(' ' . $op . ' ', array_map(function ($val) { + return preg_replace('~([\|\+&\!])~', '\\\\$1', $val); + }, $children)); if ((count($children) < 2) && $op !== '&') { return $op . ' ' . $str;