Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 63a998c

Browse files
committed
Allow span...
1 parent 1d67358 commit 63a998c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/languageHandler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export function _tJsx(jsxText, patterns, subs) {
8686
// tJsxText may be unsafe if malicious translators try to inject HTML.
8787
// Run this through sanitize-html and bail if the output isn't identical
8888
const tJsxText = _t(jsxText);
89-
const sanitized = sanitizeHtml(tJsxText);
89+
const sanitized = sanitizeHtml(tJsxText, { allowedTags: sanitizeHtml.defaults.allowedTags.concat([ 'span' ]) });
9090
if (tJsxText !== sanitized) {
9191
throw new Error(`_tJsx: translator error. untrusted HTML supplied. '${tJsxText}' != '${sanitized}'`);
9292
}

0 commit comments

Comments
 (0)