mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
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:
parent
2ba0a801c4
commit
52f3e1295b
@ -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)
|
// 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];
|
let output = [tJsxText];
|
||||||
for (let i = 0; i < patterns.length; i++) {
|
for (let i = 0; i < patterns.length; i++) {
|
||||||
// convert the last element in 'output' into 3 elements (pre-text, sub function, post-text).
|
// convert the last element in 'output' into 3 elements (pre-text, sub function, post-text).
|
||||||
|
Loading…
Reference in New Issue
Block a user