1
0
Fork 0
mirror of https://github.com/Alamantus/Lexiconga.git synced 2025-05-30 05:50:05 +02:00

Disable all HTML tags in sanitize-html usage

This commit is contained in:
Robbie Antenesse 2017-08-20 12:41:28 -06:00
parent 3dadcb0ee1
commit 97170803fa
2 changed files with 3 additions and 3 deletions

View file

@ -129,7 +129,7 @@ export const PhonologyDisplay = ({ phonologyContent }) => {
<strong>Exceptions:</strong>
<div className="content"
dangerouslySetInnerHTML={{
__html: marked(sanitizeHtml(phonologyContent.phonotactics.exceptions)),
__html: marked(sanitizeHtml(phonologyContent.phonotactics.exceptions, { allowedTags: [], allowedAttributes: [], })),
}} />
</div>
</div>

View file

@ -23,7 +23,7 @@ export class DictionaryDetails extends Component {
currentDisplay: DISPLAY.NONE,
}
this._descriptionHTML = marked(sanitizeHtml(props.description));
this._descriptionHTML = marked(sanitizeHtml(props.description, { allowedTags: [], allowedAttributes: [], }));
}
componentWillReceiveProps (nextProps) {
@ -31,7 +31,7 @@ export class DictionaryDetails extends Component {
nextDescription = nextProps.description;
if (currentDescription !== nextDescription) {
this._descriptionHTML = marked(sanitizeHtml(nextProps.description));
this._descriptionHTML = marked(sanitizeHtml(nextProps.description, { allowedTags: [], allowedAttributes: [], }));
}
}