Allow span...

pull/21833/head
Kegan Dougal 2017-05-30 17:37:13 +01:00
parent 1d67358525
commit 63a998ceb7
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ export function _tJsx(jsxText, patterns, subs) {
// tJsxText may be unsafe if malicious translators try to inject HTML.
// Run this through sanitize-html and bail if the output isn't identical
const tJsxText = _t(jsxText);
const sanitized = sanitizeHtml(tJsxText);
const sanitized = sanitizeHtml(tJsxText, { allowedTags: sanitizeHtml.defaults.allowedTags.concat([ 'span' ]) });
if (tJsxText !== sanitized) {
throw new Error(`_tJsx: translator error. untrusted HTML supplied. '${tJsxText}' != '${sanitized}'`);
}