mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 17:55:59 +02:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
@@ -1274,9 +1274,9 @@ describe('Topic\'s', function () {
|
||||
assert.equal(data.matchCount, 3);
|
||||
assert.equal(data.pageCount, 1);
|
||||
var tagData = [
|
||||
{ value: 'nodebb', color: '', bgColor: '', score: 3 },
|
||||
{ value: 'nodejs', color: '', bgColor: '', score: 1 },
|
||||
{ value: 'nosql', color: '', bgColor: '', score: 1 },
|
||||
{ value: 'nodebb', valueEscaped: 'nodebb', color: '', bgColor: '', score: 3 },
|
||||
{ value: 'nodejs', valueEscaped: 'nodejs', color: '', bgColor: '', score: 1 },
|
||||
{ value: 'nosql', valueEscaped: 'nosql', color: '', bgColor: '', score: 1 },
|
||||
];
|
||||
assert.deepEqual(data.tags, tagData);
|
||||
|
||||
|
||||
@@ -114,6 +114,15 @@ describe('new Translator(language)', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('should not unescape html in parameters', function () {
|
||||
var translator = Translator.create('en-GB');
|
||||
|
||||
var key = '[[pages:tag, some&tag]]';
|
||||
return translator.translate(key).then(function (translated) {
|
||||
assert.strictEqual(translated, 'Topics tagged under "some&tag"');
|
||||
});
|
||||
});
|
||||
|
||||
it('should properly escape and ignore % and \\, in arguments', function () {
|
||||
var translator = Translator.create('en-GB');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user