summaryrefslogtreecommitdiffstats
path: root/core/js/tests/specs/l10nSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/tests/specs/l10nSpec.js')
-rw-r--r--core/js/tests/specs/l10nSpec.js10
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 &lt;strong&gt;Steve&lt;/strong&gt;');
+ });
+ 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() {