mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-09-18 03:28:06 -04:00
Fix javascript/DOM quotting bug
This commit is contained in:
parent
90910c5cab
commit
7f6a6055a9
@ -51,7 +51,7 @@
|
|||||||
fileSize /= (1000 ** quotient);
|
fileSize /= (1000 ** quotient);
|
||||||
return `${+fileSize.toFixed(2)} ${units[quotient]}`;
|
return `${+fileSize.toFixed(2)} ${units[quotient]}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
const humanFriendlyTitle = (title) => {
|
const humanFriendlyTitle = (title) => {
|
||||||
title = title.replace(/_/g, ' ');
|
title = title.replace(/_/g, ' ');
|
||||||
return htmlEncode(title[0].toUpperCase() + title.slice(1));
|
return htmlEncode(title[0].toUpperCase() + title.slice(1));
|
||||||
@ -229,7 +229,7 @@
|
|||||||
data.querySelectorAll('entry').forEach(entry => {
|
data.querySelectorAll('entry').forEach(entry => {
|
||||||
const title = getInnerHtml(entry, 'title');
|
const title = getInnerHtml(entry, 'title');
|
||||||
const value = getInnerHtml(entry, valueEntryNode);
|
const value = getInnerHtml(entry, valueEntryNode);
|
||||||
optionStr += `<option value='${value}">${humanFriendlyTitle(title)}</option>`;
|
optionStr += `<option value="${value}">${humanFriendlyTitle(title)}</option>`;
|
||||||
});
|
});
|
||||||
document.querySelector(nodeQuery).innerHTML += optionStr;
|
document.querySelector(nodeQuery).innerHTML += optionStr;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user