1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Escape HTML

This commit is contained in:
Dmitry Lyzo 2022-01-30 00:27:26 +03:00
parent 08cbc5aa8f
commit 59adbc348a
60 changed files with 245 additions and 192 deletions

View file

@ -135,7 +135,7 @@ import 'webcomponents.js/webcomponents-lite';
this.classList.add('emby-select');
const label = this.ownerDocument.createElement('label');
label.innerHTML = this.getAttribute('label') || '';
label.innerText = this.getAttribute('label') || '';
label.classList.add('selectLabel');
label.htmlFor = this.id;
this.parentNode?.insertBefore(label, this);
@ -148,7 +148,7 @@ import 'webcomponents.js/webcomponents-lite';
EmbySelectPrototype.setLabel = function (text) {
const label = this.parentNode?.querySelector('label');
label.innerHTML = text;
label.innerText = text;
};
document.registerElement('emby-select', {