pull/691/head
Audric Ackermann 6 years ago
parent 8d11553fe5
commit 803b24ef16

@ -29,9 +29,7 @@ export class Linkify extends React.Component<Props> {
let count = 1; let count = 1;
if (isRss && text.indexOf('</') !== -1) { if (isRss && text.indexOf('</') !== -1) {
results.push( results.push(<SessionHtmlRenderer key={count++} html={text} tag="div" />);
<SessionHtmlRenderer key={count++} html={text} tag="div" />
);
// should already have links // should already have links
return results; return results;

@ -15,7 +15,6 @@ export class AccentText extends React.PureComponent<Props> {
public render() { public render() {
const { showSubtitle, i18n } = this.props; const { showSubtitle, i18n } = this.props;
return ( return (
<div className="session-content-accent-text"> <div className="session-content-accent-text">
<div className="session-content-accent-text title"> <div className="session-content-accent-text title">

@ -9,7 +9,11 @@ interface ReceivedProps {
type Props = ReceivedProps; type Props = ReceivedProps;
export const SessionHtmlRenderer: React.SFC<Props> = ({ tag = 'div', key, html }) => { export const SessionHtmlRenderer: React.SFC<Props> = ({
tag = 'div',
key,
html,
}) => {
const clean = DOMPurify.sanitize(html, { const clean = DOMPurify.sanitize(html, {
USE_PROFILES: { html: true }, USE_PROFILES: { html: true },
FORBID_ATTR: ['style', 'script'], FORBID_ATTR: ['style', 'script'],

Loading…
Cancel
Save