Sanitize translated HTML
This commit is contained in:
parent
1dce9cda9e
commit
a3ebeb5c69
|
@ -15,6 +15,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var React = require("react");
|
var React = require("react");
|
||||||
|
var sanitizeHtml = require("sanitize-html");
|
||||||
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
|
@ -30,7 +31,7 @@ module.exports = React.createClass({
|
||||||
{ _t('Custom Server Options') }
|
{ _t('Custom Server Options') }
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_Dialog_content">
|
<div className="mx_Dialog_content">
|
||||||
<span dangerouslySetInnerHTML={{__html: _t('customServer_text')}} />
|
<span dangerouslySetInnerHTML={{__html: sanitizeHtml(_t('customServer_text'))}} />
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_Dialog_buttons">
|
<div className="mx_Dialog_buttons">
|
||||||
<button onClick={this.props.onFinished} autoFocus={true}>
|
<button onClick={this.props.onFinished} autoFocus={true}>
|
||||||
|
|
Loading…
Reference in New Issue