From f90be0a83ef5aa333b19e259faab73ee117d5339 Mon Sep 17 00:00:00 2001 From: Sævar Öfjörð Magnússon Date: Mon, 9 Oct 2017 10:40:32 +0000 Subject: Fixed #28688 -- Made admin's URLify.js skip removal of English words if non-ASCII chars are present. --- js_tests/admin/URLify.test.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'js_tests/admin/URLify.test.js') diff --git a/js_tests/admin/URLify.test.js b/js_tests/admin/URLify.test.js index fafa9af113..cc738bc4ad 100644 --- a/js_tests/admin/URLify.test.js +++ b/js_tests/admin/URLify.test.js @@ -23,3 +23,8 @@ QUnit.test('merge adjacent whitespace', function(assert) { QUnit.test('trim trailing hyphens', function(assert) { assert.strictEqual(URLify('D silent always', 9, true), 'd-silent'); }); + +QUnit.test('do not remove English words if the string contains non-ASCII', function(assert) { + // If removing English words wasn't skipped, the last 'a' would be removed. + assert.strictEqual(URLify('Kaupa-miða', 255, true), 'kaupa-miða'); +}); -- cgit v1.3