Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion modules/login/jsx/loginIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Loader from 'Loader';
import Panel from 'Panel';
import DOMPurify from 'dompurify';

/**
* Login form.
Expand Down Expand Up @@ -177,7 +178,9 @@ class Login extends Component {
}
if (this.state.mode === 'login') {
const study = (
<div dangerouslySetInnerHTML={{__html: this.state.study.description}}/>
<div dangerouslySetInnerHTML={{
__html: DOMPurify.sanitize(this.state.study.description),
}}/>
);
const error = this.state.form.error.toggle ? (
<StaticElement
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@babel/runtime": "^7.10.5",
"@fortawesome/fontawesome-free": "^5.11.2",
"copy-webpack-plugin": "^11.0.0",
"dompurify": "^2.2.9",
"jstat": "^1.9.5",
"papaparse": "^5.3.0",
"prop-types": "^15.7.2",
Expand Down