diff options
| author | 2024-09-12 11:04:49 +0200 | |
|---|---|---|
| committer | 2024-09-12 11:04:49 +0200 | |
| commit | fd1b5e9343b6fe92b4e5dfbbc2f01ddfcd010af9 (patch) | |
| tree | 5cc4e7399212d2fdce401465e3590f2275b16c26 /p/scripts | |
| parent | d1f1e42c2b180f34276d7ddd1a2bfeaf4e59ed05 (diff) | |
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
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 5 |
1 files changed, 5 insertions, 0 deletions
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 => { |
