Skip to content

Commit

Permalink
Disable rendering widgets on federated pages (security)
Browse files Browse the repository at this point in the history
  • Loading branch information
zefhemel committed Feb 8, 2025
1 parent 38dc5bb commit 8f29cef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/cm_plugins/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,5 +179,6 @@ export const invisibleDecoration = Decoration.replace({});
export function shouldRenderWidgets(client: Client) {
const currentPageMeta = client.ui.viewState.currentPageMeta;
return !currentPageMeta?.tags?.includes("template") &&
currentPageMeta?.pageDecoration?.renderWidgets !== false;
currentPageMeta?.pageDecoration?.renderWidgets !== false &&
!currentPageMeta?.name.startsWith("!");
}

0 comments on commit 8f29cef

Please sign in to comment.