Skip to content

Commit

Permalink
fix(EuiPageTemplate): replace CSS.escape usage with string replace …
Browse files Browse the repository at this point in the history
…to fix SSR support when `CSS` utils are unavailable
  • Loading branch information
tkajtoch committed Feb 12, 2024
1 parent 890f762 commit b011e14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/page_template/page_template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const _EuiPageTemplate: FunctionComponent<EuiPageTemplateProps> = ({
restrictWidth,
paddingSize,
// pageInnerId may contain colons that are parsed as pseudo-elements if not escaped
parent: `#${CSS.escape(pageInnerId)}`,
parent: `#${pageInnerId.replaceAll(':', '\\:')}`,
});

const innerPanelled = () => panelled ?? Boolean(sidebar.length > 0);
Expand Down

0 comments on commit b011e14

Please sign in to comment.