We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a27012 commit 58289eeCopy full SHA for 58289ee
1 file changed
tcpdf.php
@@ -23726,9 +23726,9 @@ protected function SVGPath($d, $style='') {
23726
}
23727
$params = array();
23728
if (isset($val[2])) {
23729
- // get curve parameters
23730
- preg_match_all('/-?\d*\.?\d+/', trim($val[2]), $matches);
23731
- $rawparams = $matches[0];
+ // get curve parameters, see https://github.com/tecnickcom/TCPDF/issues/767
+ $rawparams = preg_split('/([\,\s]+)/si', trim($val[2]));
+ $rawparams = array_filter($rawparams, fn ($p) => trim($p) != '');
23732
23733
foreach ($rawparams as $ck => $cp) {
23734
$params[$ck] = $this->getHTMLUnitToUnits($cp, 0, $this->svgunit, false);
0 commit comments