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
This commit is contained in:
Alexandre Alapetite authored and GitHub committed 2024-09-12 11:04:49 +02:00
1 parent d1f1e42c2b
commit fd1b5e9343
6 files changed
+33 -10

No files matched your search

+5
View File
@@ -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 => {