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.
2 parents a63f81e + 58289ee commit c14219aCopy full SHA for c14219a
1 file changed
tcpdf.php
@@ -23730,9 +23730,9 @@ protected function SVGPath($d, $style='') {
23730
}
23731
$params = array();
23732
if (isset($val[2])) {
23733
- // get curve parameters
23734
- preg_match_all('/-?\d*\.?\d+/', trim($val[2]), $matches);
23735
- $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) != '');
23736
23737
foreach ($rawparams as $ck => $cp) {
23738
$params[$ck] = $this->getHTMLUnitToUnits($cp, 0, $this->svgunit, false);
0 commit comments