mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Backport pull request #4243 from jellyfin/release-10.8.z
Fix HTML escaping in MediaSession and on remote page
Original-merge: ae907cd8a6
Merged-by: Bill Thornton <thornbill@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
7f30d82d17
commit
5e6de2d7db
2 changed files with 4 additions and 6 deletions
|
@ -500,14 +500,14 @@ import { appRouter } from '../appRouter';
|
||||||
textLines[1].secondary = true;
|
textLines[1].secondary = true;
|
||||||
if (textLines[1].text) {
|
if (textLines[1].text) {
|
||||||
const text = document.createElement('a');
|
const text = document.createElement('a');
|
||||||
text.innerHTML = textLines[1].text;
|
text.innerText = textLines[1].text;
|
||||||
secondaryText.appendChild(text);
|
secondaryText.appendChild(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (textLines[0].text) {
|
if (textLines[0].text) {
|
||||||
const text = document.createElement('a');
|
const text = document.createElement('a');
|
||||||
text.innerHTML = textLines[0].text;
|
text.innerText = textLines[0].text;
|
||||||
itemText.appendChild(text);
|
itemText.appendChild(text);
|
||||||
}
|
}
|
||||||
nowPlayingTextElement.appendChild(itemText);
|
nowPlayingTextElement.appendChild(itemText);
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import escapeHtml from 'escape-html';
|
|
||||||
|
|
||||||
export function getNowPlayingNames(nowPlayingItem, includeNonNameInfo) {
|
export function getNowPlayingNames(nowPlayingItem, includeNonNameInfo) {
|
||||||
let topItem = nowPlayingItem;
|
let topItem = nowPlayingItem;
|
||||||
let bottomItem = null;
|
let bottomItem = null;
|
||||||
|
@ -61,13 +59,13 @@ export function getNowPlayingNames(nowPlayingItem, includeNonNameInfo) {
|
||||||
const list = [];
|
const list = [];
|
||||||
|
|
||||||
list.push({
|
list.push({
|
||||||
text: escapeHtml(topText),
|
text: topText,
|
||||||
item: topItem
|
item: topItem
|
||||||
});
|
});
|
||||||
|
|
||||||
if (bottomText) {
|
if (bottomText) {
|
||||||
list.push({
|
list.push({
|
||||||
text: escapeHtml(bottomText),
|
text: bottomText,
|
||||||
item: bottomItem
|
item: bottomItem
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue