mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #3519 from dmitrylyzo/fix-escapehtml
Escape HTML
(cherry picked from commit ef811e699c
)
Signed-off-by: crobibero <cody@robibe.ro>
This commit is contained in:
parent
a74ddbb5ca
commit
7ec51f111c
6 changed files with 8 additions and 7 deletions
|
@ -949,7 +949,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
|
|
||||||
}, item.ChannelName));
|
}, item.ChannelName));
|
||||||
} else {
|
} else {
|
||||||
lines.push(escapeHtml(item.ChannelName) || ' ');
|
lines.push(escapeHtml(item.ChannelName || '') || ' ');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -981,7 +981,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
if (item.RecordAnyChannel) {
|
if (item.RecordAnyChannel) {
|
||||||
lines.push(globalize.translate('AllChannels'));
|
lines.push(globalize.translate('AllChannels'));
|
||||||
} else {
|
} else {
|
||||||
lines.push(escapeHtml(item.ChannelName) || globalize.translate('OneChannel'));
|
lines.push(escapeHtml(item.ChannelName || '') || globalize.translate('OneChannel'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import escapeHtml from 'escape-html';
|
||||||
import React, { FunctionComponent } from 'react';
|
import React, { FunctionComponent } from 'react';
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
|
@ -17,7 +18,7 @@ const createCheckBoxElement = ({className, Name, dataAttributes, AppName, checke
|
||||||
class="${className}"
|
class="${className}"
|
||||||
${dataAttributes} ${checkedAttribute}
|
${dataAttributes} ${checkedAttribute}
|
||||||
/>
|
/>
|
||||||
<span>${Name} ${AppName}</span>
|
<span>${escapeHtml(Name || '')} ${AppName}</span>
|
||||||
</label>`
|
</label>`
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@ class DirectoryBrowser {
|
||||||
html += '<div class="formDialogHeader">';
|
html += '<div class="formDialogHeader">';
|
||||||
html += `<button is="paper-icon-button-light" class="btnCloseDialog autoSize" tabindex="-1" title="${globalize.translate('ButtonBack')}"><span class="material-icons arrow_back" aria-hidden="true"></span></button>`;
|
html += `<button is="paper-icon-button-light" class="btnCloseDialog autoSize" tabindex="-1" title="${globalize.translate('ButtonBack')}"><span class="material-icons arrow_back" aria-hidden="true"></span></button>`;
|
||||||
html += '<h3 class="formDialogHeaderTitle">';
|
html += '<h3 class="formDialogHeaderTitle">';
|
||||||
html += escapeHtml(options.header) || globalize.translate('HeaderSelectPath');
|
html += escapeHtml(options.header || '') || globalize.translate('HeaderSelectPath');
|
||||||
html += '</h3>';
|
html += '</h3>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
html += getEditorHtml(options, systemInfo);
|
html += getEditorHtml(options, systemInfo);
|
||||||
|
|
|
@ -246,7 +246,7 @@ import template from './itemidentifier.template.html';
|
||||||
} else {
|
} else {
|
||||||
html += '<div class="cardText cardText-secondary cardTextCentered">';
|
html += '<div class="cardText cardText-secondary cardTextCentered">';
|
||||||
}
|
}
|
||||||
html += escapeHtml(lines[i]) || ' ';
|
html += escapeHtml(lines[i] || '') || ' ';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ function reload(page) {
|
||||||
$('.monitorUsers', page).hide();
|
$('.monitorUsers', page).hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.notificationType', page).html(escapeHtml(typeInfo.Name) || 'Unknown Notification');
|
$('.notificationType', page).html(escapeHtml(typeInfo.Name || '') || 'Unknown Notification');
|
||||||
|
|
||||||
if (!notificationConfig) {
|
if (!notificationConfig) {
|
||||||
notificationConfig = {
|
notificationConfig = {
|
||||||
|
|
|
@ -450,7 +450,7 @@ function renderName(item, container, context) {
|
||||||
} else if (item.ParentIndexNumber != null && item.Type === 'Episode') {
|
} else if (item.ParentIndexNumber != null && item.Type === 'Episode') {
|
||||||
parentNameHtml.push(`<a style="color:inherit;" class="button-link itemAction" is="emby-linkbutton" href="#" data-action="link" data-id="${item.SeasonId}" data-serverid="${item.ServerId}" data-type="Season" data-isfolder="true">${escapeHtml(item.SeasonName)}</a>`);
|
parentNameHtml.push(`<a style="color:inherit;" class="button-link itemAction" is="emby-linkbutton" href="#" data-action="link" data-id="${item.SeasonId}" data-serverid="${item.ServerId}" data-type="Season" data-isfolder="true">${escapeHtml(item.SeasonName)}</a>`);
|
||||||
} else if (item.ParentIndexNumber != null && item.IsSeries) {
|
} else if (item.ParentIndexNumber != null && item.IsSeries) {
|
||||||
parentNameHtml.push(escapeHtml(item.SeasonName) || 'S' + item.ParentIndexNumber);
|
parentNameHtml.push(escapeHtml(item.SeasonName || 'S' + item.ParentIndexNumber));
|
||||||
} else if (item.Album && item.AlbumId && (item.Type === 'MusicVideo' || item.Type === 'Audio')) {
|
} else if (item.Album && item.AlbumId && (item.Type === 'MusicVideo' || item.Type === 'Audio')) {
|
||||||
parentNameHtml.push(`<a style="color:inherit;" class="button-link itemAction" is="emby-linkbutton" href="#" data-action="link" data-id="${item.AlbumId}" data-serverid="${item.ServerId}" data-type="MusicAlbum" data-isfolder="true">${escapeHtml(item.Album)}</a>`);
|
parentNameHtml.push(`<a style="color:inherit;" class="button-link itemAction" is="emby-linkbutton" href="#" data-action="link" data-id="${item.AlbumId}" data-serverid="${item.ServerId}" data-type="MusicAlbum" data-isfolder="true">${escapeHtml(item.Album)}</a>`);
|
||||||
} else if (item.Album) {
|
} else if (item.Album) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue