diff options
Diffstat (limited to 'core/js/tests/specs/l10nSpec.js')
-rw-r--r-- | core/js/tests/specs/l10nSpec.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/js/tests/specs/l10nSpec.js b/core/js/tests/specs/l10nSpec.js index cf7c8b11b1c..bafc7746d6c 100644 --- a/core/js/tests/specs/l10nSpec.js +++ b/core/js/tests/specs/l10nSpec.js @@ -42,6 +42,16 @@ describe('OC.L10N tests', function() { t(TEST_APP, 'Hello {name}, the weather is {weather}', {name: 'Steve', weather: t(TEST_APP, 'sunny')}) ).toEqual('Hallo Steve, das Wetter ist sonnig'); }); + it('returns text with escaped placeholder', function() { + expect( + t(TEST_APP, 'Hello {name}', {name: '<strong>Steve</strong>'}) + ).toEqual('Hello <strong>Steve</strong>'); + }); + it('returns text with not escaped placeholder', function() { + expect( + t(TEST_APP, 'Hello {name}', {name: '<strong>Steve</strong>'}, null, {escape: false}) + ).toEqual('Hello <strong>Steve</strong>'); + }); }); describe('plurals', function() { function checkPlurals() { |