Escape HTML
This commit is contained in:
@@ -45,7 +45,7 @@ import 'webcomponents.js/webcomponents-lite';
|
||||
const parentNode = this.parentNode;
|
||||
const document = this.ownerDocument;
|
||||
const label = document.createElement('label');
|
||||
label.innerHTML = this.getAttribute('label') || '';
|
||||
label.innerText = this.getAttribute('label') || '';
|
||||
label.classList.add('inputLabel');
|
||||
label.classList.add('inputLabelUnfocused');
|
||||
|
||||
@@ -114,7 +114,7 @@ import 'webcomponents.js/webcomponents-lite';
|
||||
};
|
||||
|
||||
EmbyInputPrototype.label = function (text) {
|
||||
this.labelElement.innerHTML = text;
|
||||
this.labelElement.innerText = text;
|
||||
};
|
||||
|
||||
document.registerElement('emby-input', {
|
||||
|
||||
@@ -79,7 +79,7 @@ import ServerConnections from '../../components/ServerConnections';
|
||||
|
||||
const text = button.querySelector('.button-text');
|
||||
if (text) {
|
||||
text.innerHTML = button.title;
|
||||
text.innerText = button.title;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ import ServerConnections from '../../components/ServerConnections';
|
||||
|
||||
const text = button.querySelector('.button-text');
|
||||
if (text) {
|
||||
text.innerHTML = button.title;
|
||||
text.innerText = button.title;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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', {
|
||||
|
||||
@@ -154,7 +154,7 @@ import '../emby-input/emby-input';
|
||||
|
||||
if (topContainer && this.getAttribute('label')) {
|
||||
const label = this.ownerDocument.createElement('label');
|
||||
label.innerHTML = this.getAttribute('label');
|
||||
label.innerText = this.getAttribute('label');
|
||||
label.classList.add('sliderLabel');
|
||||
label.htmlFor = this.id;
|
||||
topContainer.insertBefore(label, topContainer.firstChild);
|
||||
|
||||
@@ -107,7 +107,7 @@ import '../emby-input/emby-input';
|
||||
|
||||
const parentNode = this.parentNode;
|
||||
const label = this.ownerDocument.createElement('label');
|
||||
label.innerHTML = this.getAttribute('label') || '';
|
||||
label.innerText = this.getAttribute('label') || '';
|
||||
label.classList.add('textareaLabel');
|
||||
|
||||
label.htmlFor = this.id;
|
||||
@@ -123,7 +123,7 @@ import '../emby-input/emby-input';
|
||||
});
|
||||
|
||||
this.label = function (text) {
|
||||
label.innerHTML = text;
|
||||
label.innerText = text;
|
||||
};
|
||||
|
||||
new autoGrow(this);
|
||||
|
||||
Reference in New Issue
Block a user