Skip to content

Commit

Permalink
Do not merge additional USE element attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
bsweeney committed Dec 11, 2023
1 parent 88163cb commit 08ce6a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Svg/Tag/UseTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function handle($attributes)
}

$mergedAttributes = $this->reference->attributes;
$attributesToNotMerge = ['x', 'y', 'width', 'height'];
$attributesToNotMerge = ['x', 'y', 'width', 'height', 'href', 'xlink:href', 'id'];
foreach ($attributes as $attrKey => $attrVal) {
if (!in_array($attrKey, $attributesToNotMerge) && !isset($mergedAttributes[$attrKey])) {
$mergedAttributes[$attrKey] = $attrVal;
Expand Down

0 comments on commit 08ce6a9

Please sign in to comment.