1
0
Fork 0
mirror of https://github.com/Alamantus/Lexiconga.git synced 2025-06-03 16:00:12 +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> <strong>Exceptions:</strong>
<div className="content" <div className="content"
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: marked(sanitizeHtml(phonologyContent.phonotactics.exceptions)), __html: marked(sanitizeHtml(phonologyContent.phonotactics.exceptions, { allowedTags: [], allowedAttributes: [], })),
}} /> }} />
</div> </div>
</div> </div>

View file

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