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
const escapeHtml = (unsafe) => {
return unsafe
.toString()
.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#039;');
if (unsafe) {
return unsafe
.toString()
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#039;');
}
return '';
};
const CSS_STYLE = {

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

Loading…
Cancel
Save