You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-21 07:42:09 +03:00
Allow span...
This commit is contained in:
@ -86,7 +86,7 @@ export function _tJsx(jsxText, patterns, subs) {
|
|||||||
// tJsxText may be unsafe if malicious translators try to inject HTML.
|
// tJsxText may be unsafe if malicious translators try to inject HTML.
|
||||||
// Run this through sanitize-html and bail if the output isn't identical
|
// Run this through sanitize-html and bail if the output isn't identical
|
||||||
const tJsxText = _t(jsxText);
|
const tJsxText = _t(jsxText);
|
||||||
const sanitized = sanitizeHtml(tJsxText);
|
const sanitized = sanitizeHtml(tJsxText, { allowedTags: sanitizeHtml.defaults.allowedTags.concat([ 'span' ]) });
|
||||||
if (tJsxText !== sanitized) {
|
if (tJsxText !== sanitized) {
|
||||||
throw new Error(`_tJsx: translator error. untrusted HTML supplied. '${tJsxText}' != '${sanitized}'`);
|
throw new Error(`_tJsx: translator error. untrusted HTML supplied. '${tJsxText}' != '${sanitized}'`);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user