Skip to content
Snippets Groups Projects
Commit 2e27901f authored by Matthijs Van Assche's avatar Matthijs Van Assche
Browse files

Issue #3508677: Update code styling

parent 0ccaae35
Branches
Tags 8.x-1.7
1 merge request!11285Issue #3508677: Fix support for special characters in active-link.js
...@@ -29,10 +29,12 @@ ...@@ -29,10 +29,12 @@
const [key, value] = entries[i]; const [key, value] = entries[i];
if (typeof value === 'string') { if (typeof value === 'string') {
object[key] = value object[key] = value.replace(
.replace(/[\u007F-\uFFFF\u003c\u003e\u0022\u0027\u0026]/g, (chr) => { /[\u007F-\uFFFF\u003c\u003e\u0022\u0027\u0026]/g,
(chr) => {
return '&u' + ('0000' + chr.charCodeAt(0).toString(16)).substr(-4); return '&u' + ('0000' + chr.charCodeAt(0).toString(16)).substr(-4);
}); }
);
} }
else if (typeof value === 'object') { else if (typeof value === 'object') {
object[key] = jsonEncode(value, false); object[key] = jsonEncode(value, false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment