Don't use string interpolation in _tJsx as it uses regexes for that

Signed-off-by: Stefan Parviainen <pafcu@iki.fi>
This commit is contained in:
Stefan Parviainen 2017-10-11 09:14:11 +02:00
parent 2ba0a801c4
commit 52f3e1295b

View File

@ -109,7 +109,7 @@ export function _tJsx(jsxText, patterns, subs) {
}
// The translation returns text so there's no XSS vector here (no unsafe HTML, no code execution)
const tJsxText = _t(jsxText);
const tJsxText = _t(jsxText, {interpolate: false});
let output = [tJsxText];
for (let i = 0; i < patterns.length; i++) {
// convert the last element in 'output' into 3 elements (pre-text, sub function, post-text).