mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 12:31:33 +01:00
Escape arguments in Translator.compile
This commit is contained in:
@@ -251,5 +251,13 @@ describe('Translator static methods', function () {
|
||||
);
|
||||
done();
|
||||
});
|
||||
|
||||
it('should escape `%` and `,` in arguments', function (done) {
|
||||
assert.strictEqual(
|
||||
Translator.compile('amazing:cool', '100% awesome!', 'one, two, and three'),
|
||||
'[[amazing:cool, 100% awesome!, one, two, and three]]'
|
||||
);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user