Fix: Broken design in case of maxCount not used

pull/16/head
Juraj Nyíri 4 years ago
parent 7e3accbdcb
commit ce4254df14

@ -18690,13 +18690,16 @@ class Plex {
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
const escapeHtml = (unsafe) => { const escapeHtml = (unsafe) => {
return unsafe if (unsafe) {
.toString() return unsafe
.replace(/&/g, '&') .toString()
.replace(/</g, '&lt;') .replace(/&/g, '&amp;')
.replace(/>/g, '&gt;') .replace(/</g, '&lt;')
.replace(/"/g, '&quot;') .replace(/>/g, '&gt;')
.replace(/'/g, '&#039;'); .replace(/"/g, '&quot;')
.replace(/'/g, '&#039;');
}
return '';
}; };
const CSS_STYLE = { const CSS_STYLE = {

@ -1,12 +1,15 @@
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
const escapeHtml = (unsafe: any): string => { const escapeHtml = (unsafe: any): string => {
return unsafe if (unsafe) {
.toString() return unsafe
.replace(/&/g, '&amp;') .toString()
.replace(/</g, '&lt;') .replace(/&/g, '&amp;')
.replace(/>/g, '&gt;') .replace(/</g, '&lt;')
.replace(/"/g, '&quot;') .replace(/>/g, '&gt;')
.replace(/'/g, '&#039;'); .replace(/"/g, '&quot;')
.replace(/'/g, '&#039;');
}
return '';
}; };
// eslint-disable-next-line import/prefer-default-export // eslint-disable-next-line import/prefer-default-export

Loading…
Cancel
Save