Skip to content

Commit f19762b

Browse files
authored
fix(VariantManagement): allow quotes in VariantItem name (#7114)
1 parent e0e636b commit f19762b

File tree

1 file changed

+3
-1
lines changed
  • packages/main/src/components/VariantManagement

1 file changed

+3
-1
lines changed

packages/main/src/components/VariantManagement/index.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ const VariantManagement = forwardRef<HTMLDivElement, VariantManagementPropTypes>
139139
return false;
140140
}
141141
let updatedProps: Omit<SelectedVariant, 'children' | 'variantItem'> = {};
142-
const currentVariant = popoverRef.current.querySelector(`ui5-li[data-children="${child.props.children}"]`);
142+
const currentVariant = popoverRef.current.querySelector(
143+
`ui5-li[data-children="${CSS.escape(child.props.children)}"]`
144+
);
143145
callbackProperties.prevVariants.push(child.props);
144146
if (defaultView) {
145147
if (defaultView === child.props.children) {

0 commit comments

Comments
 (0)