From fd1b5e9343b6fe92b4e5dfbbc2f01ddfcd010af9 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 12 Sep 2024 11:04:49 +0200 Subject: Fix inversed encoding logic in paramArray (#6800) * Fix inversed encoding logic in paramArray https://github.com/FreshRSS/FreshRSS/pull/6797#discussion_r1754661634 Also fix the possibility to use `<'&">` in shortcuts, and some minor encoding bugs in user queries * Forgot paramArrayString --- p/scripts/main.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'p') diff --git a/p/scripts/main.js b/p/scripts/main.js index 663bfe74e..1566b38cb 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -908,6 +908,11 @@ function init_column_categories() { function init_shortcuts() { Object.keys(context.shortcuts).forEach(function (k) { context.shortcuts[k] = (context.shortcuts[k] || '').toUpperCase(); + if (context.shortcuts[k].indexOf('&') >= 0) { + // Decode potential HTML entities <'&"> + const parser = new DOMParser(); + context.shortcuts[k] = parser.parseFromString(context.shortcuts[k], 'text/html').documentElement.textContent; + } }); document.addEventListener('keydown', ev => { -- cgit v1.2.3