'sup',
'ul',
],
- ALLOWED_ATTR: ['src', 'width', 'height', 'href', 'alt', 'title'],
+ ALLOWED_ATTR: ['src', 'width', 'height', 'href', 'alt', 'title', 'style' ],
};
export const sanitizeHTML = (dirtyInput: string): string => DOMPurify.sanitize(dirtyInput, domPurifyConfig);
import { ReactNode } from "react";
import { AdminMenu } from "views-components/main-app-bar/admin-menu";
import { pluginConfig } from 'plugins';
+import { sanitizeHTML } from "common/html-sanitize";
type CssRules = 'toolbar' | 'link';
{pluginConfig.appBarLeft || <Grid container item xs={3} direction="column" justify="center">
<Typography variant='h6' color="inherit" noWrap>
<Link to={Routes.ROOT} className={props.classes.link}>
- <span dangerouslySetInnerHTML={{ __html: props.siteBanner }} /> ({props.uuidPrefix})
+ <span dangerouslySetInnerHTML={{ __html: sanitizeHTML(props.siteBanner) }} /> ({props.uuidPrefix})
</Link>
</Typography>
<Typography variant="caption" color="inherit">
import { ArvadosTheme } from 'common/custom-theme';
import { navigateToLinkAccount } from 'store/navigation/navigation-action';
import { RootState } from 'store/store';
+import { sanitizeHTML } from 'common/html-sanitize';
export type CssRules = 'root' | 'ontop' | 'title';
style={{ marginTop: 56, height: "100%" }}>
<Grid item>
<Typography>
- <span dangerouslySetInnerHTML={{ __html: inactivePageText }} style={{ margin: "1em" }} />
+ <span dangerouslySetInnerHTML={{ __html: sanitizeHTML(inactivePageText) }} style={{ margin: "1em" }} />
</Typography>
</Grid>
{ !isLoginClusterFederation
import { LoginForm } from 'views-components/login-form/login-form';
import Axios from 'axios';
import { Config } from 'common/config';
+import { sanitizeHTML } from 'common/html-sanitize';
type CssRules = 'root' | 'container' | 'title' | 'content' | 'content__bolder' | 'button';
style={{ marginTop: 56, overflowY: "auto", height: "100%" }}>
<Grid item className={classes.container}>
<Typography component="div">
- <div dangerouslySetInnerHTML={{ __html: welcomePage }} style={{ margin: "1em" }} />
+ <div dangerouslySetInnerHTML={{ __html: sanitizeHTML(welcomePage) }} style={{ margin: "1em" }} />
</Typography>
{Object.keys(remoteHosts).length > 1 && loginCluster === "" &&
import { CopyIcon } from 'components/icon/icon';
import CopyToClipboard from 'react-copy-to-clipboard';
import { snackbarActions, SnackbarKind } from 'store/snackbar/snackbar-actions';
+import { sanitizeHTML } from 'common/html-sanitize';
type CssRules = 'button' | 'codeSnippet' | 'link' | 'linkIcon' | 'rightAlign' | 'cardWithoutMachines' | 'icon' | 'chipsRoot' | 'copyIcon' | 'tableWrapper' | 'webshellButton';
<Card>
<CardContent>
<Typography>
- <div dangerouslySetInnerHTML={{ __html: props.helpText }} style={{ margin: "1em" }} />
+ <div dangerouslySetInnerHTML={{ __html: sanitizeHTML(props.helpText) }} style={{ margin: "1em" }} />
</Typography>
</CardContent>
</Card>