From 2e27901fb9171132dbd9d13c562d6fd8ed1c85fe Mon Sep 17 00:00:00 2001 From: Matthijs Van Assche <26224-Matthijs@users.noreply.drupalcode.org> Date: Mon, 24 Feb 2025 15:13:10 +0000 Subject: [PATCH] Issue #3508677: Update code styling --- core/misc/active-link.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/misc/active-link.js b/core/misc/active-link.js index f31fa6f9cc92..acc8bf8daaab 100644 --- a/core/misc/active-link.js +++ b/core/misc/active-link.js @@ -29,10 +29,12 @@ const [key, value] = entries[i]; if (typeof value === 'string') { - object[key] = value - .replace(/[\u007F-\uFFFF\u003c\u003e\u0022\u0027\u0026]/g, (chr) => { + object[key] = value.replace( + /[\u007F-\uFFFF\u003c\u003e\u0022\u0027\u0026]/g, + (chr) => { return '&u' + ('0000' + chr.charCodeAt(0).toString(16)).substr(-4); - }); + } + ); } else if (typeof value === 'object') { object[key] = jsonEncode(value, false); -- GitLab