mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Backport pull request #3789 from jellyfin/release-10.8.z
Fix XSS in card aria labels
Original-merge: 747f7beae7
Merged-by: Bill Thornton <thornbill@users.noreply.github.com>
Backported-by: Joshua Boniface <joshua@boniface.me>
This commit is contained in:
parent
d6b5b0858f
commit
3fb990fdd2
1 changed files with 2 additions and 2 deletions
|
@ -1349,7 +1349,7 @@ import { appRouter } from '../appRouter';
|
||||||
|
|
||||||
cardImageContainerClose = '</div>';
|
cardImageContainerClose = '</div>';
|
||||||
} else {
|
} else {
|
||||||
const cardImageContainerAriaLabelAttribute = ` aria-label="${item.Name}"`;
|
const cardImageContainerAriaLabelAttribute = ` aria-label="${escapeHtml(item.Name)}"`;
|
||||||
|
|
||||||
const url = appRouter.getRouteUrl(item);
|
const url = appRouter.getRouteUrl(item);
|
||||||
// Don't use the IMG tag with safari because it puts a white border around it
|
// Don't use the IMG tag with safari because it puts a white border around it
|
||||||
|
@ -1433,7 +1433,7 @@ import { appRouter } from '../appRouter';
|
||||||
if (tagName === 'button') {
|
if (tagName === 'button') {
|
||||||
className += ' itemAction';
|
className += ' itemAction';
|
||||||
actionAttribute = ' data-action="' + action + '"';
|
actionAttribute = ' data-action="' + action + '"';
|
||||||
ariaLabelAttribute = ` aria-label="${item.Name}"`;
|
ariaLabelAttribute = ` aria-label="${escapeHtml(item.Name)}"`;
|
||||||
} else {
|
} else {
|
||||||
actionAttribute = '';
|
actionAttribute = '';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue