Skip to content

Commit a3ebeb5

Browse files
committed
Sanitize translated HTML
1 parent 1dce9cd commit a3ebeb5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/components/views/login/VectorCustomServerDialog.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ limitations under the License.
1515
*/
1616

1717
var React = require("react");
18+
var sanitizeHtml = require("sanitize-html");
1819
import { _t } from 'matrix-react-sdk/lib/languageHandler';
1920

2021
module.exports = React.createClass({
@@ -30,7 +31,7 @@ module.exports = React.createClass({
3031
{ _t('Custom Server Options') }
3132
</div>
3233
<div className="mx_Dialog_content">
33-
<span dangerouslySetInnerHTML={{__html: _t('customServer_text')}} />
34+
<span dangerouslySetInnerHTML={{__html: sanitizeHtml(_t('customServer_text'))}} />
3435
</div>
3536
<div className="mx_Dialog_buttons">
3637
<button onClick={this.props.onFinished} autoFocus={true}>

0 commit comments

Comments
 (0)