Skip to content

Commit

Permalink
SVG Mask: don't allow spaces in item id
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Aug 22, 2024
1 parent 83feac6 commit f255351
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/Boxes/boundingbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ eTask* BoundingBox::saveSVGWithTransform(SvgExporter& exp,

if (maskId == ptr->prp_getName()) { // move mask to defs
auto& eleMask = taskPtr->initialize("mask");
eleMask.setAttribute("id", ptr->prp_getName());
eleMask.setAttribute("id", QString(ptr->prp_getName()).simplified().replace(" ", ""));
eleMask.appendChild(withEffects);
expPtr->addToDefs(eleMask);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/core/Boxes/containerbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class GroupSaverSVG : public ComplexTask
}
}
if (!mItemMaskId.isEmpty()) {
mEle.setAttribute("mask", QString("url(#%1)").arg(mItemMaskId));
mEle.setAttribute("mask", QString("url(#%1)").arg(QString(mItemMaskId).simplified().replace(" ", "")));
}
}
}
Expand Down

0 comments on commit f255351

Please sign in to comment.