mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Remove escapeHTML
Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
parent
533ae17767
commit
11d013b07e
7 changed files with 7 additions and 13 deletions
|
@ -2,7 +2,6 @@ import React, { type FC } from 'react';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import ButtonGroup from '@mui/material/ButtonGroup';
|
import ButtonGroup from '@mui/material/ButtonGroup';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import escapeHTML from 'escape-html';
|
|
||||||
import { appRouter } from 'components/router/appRouter';
|
import { appRouter } from 'components/router/appRouter';
|
||||||
import itemHelper from 'components/itemHelper';
|
import itemHelper from 'components/itemHelper';
|
||||||
import { playbackManager } from 'components/playback/playbackmanager';
|
import { playbackManager } from 'components/playback/playbackmanager';
|
||||||
|
@ -42,7 +41,7 @@ const CardHoverMenu: FC<CardHoverMenuProps> = ({
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
href={url}
|
href={url}
|
||||||
aria-label={escapeHTML(item.Name)}
|
aria-label={item.Name || ''}
|
||||||
className='cardImageContainer'
|
className='cardImageContainer'
|
||||||
></a>
|
></a>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ import React, { type FC } from 'react';
|
||||||
import ButtonGroup from '@mui/material/ButtonGroup';
|
import ButtonGroup from '@mui/material/ButtonGroup';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { appRouter } from 'components/router/appRouter';
|
import { appRouter } from 'components/router/appRouter';
|
||||||
import escapeHTML from 'escape-html';
|
|
||||||
import PlayArrowIconButton from '../../common/PlayArrowIconButton';
|
import PlayArrowIconButton from '../../common/PlayArrowIconButton';
|
||||||
import MoreVertIconButton from '../../common/MoreVertIconButton';
|
import MoreVertIconButton from '../../common/MoreVertIconButton';
|
||||||
|
|
||||||
|
@ -61,7 +60,7 @@ const CardOverlayButtons: FC<CardOverlayButtonsProps> = ({
|
||||||
return (
|
return (
|
||||||
<a
|
<a
|
||||||
href={url}
|
href={url}
|
||||||
aria-label={escapeHTML(item.Name)}
|
aria-label={item.Name || ''}
|
||||||
style={{
|
style={{
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
top: 0,
|
top: 0,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import React, { type FC } from 'react';
|
import React, { type FC } from 'react';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import escapeHTML from 'escape-html';
|
|
||||||
import type { TextLine } from './cardHelper';
|
import type { TextLine } from './cardHelper';
|
||||||
|
|
||||||
interface CardTextProps {
|
interface CardTextProps {
|
||||||
|
@ -19,7 +18,7 @@ const CardText: FC<CardTextProps> = ({ className, textLine }) => {
|
||||||
title={titleAction.title}
|
title={titleAction.title}
|
||||||
{...titleAction.dataAttributes}
|
{...titleAction.dataAttributes}
|
||||||
>
|
>
|
||||||
{escapeHTML(titleAction.title)}
|
{titleAction.title}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -216,7 +216,7 @@ function getParentTitle(
|
||||||
serverId: NullableString,
|
serverId: NullableString,
|
||||||
item: ItemDto
|
item: ItemDto
|
||||||
) {
|
) {
|
||||||
if (isOuterFooter && item.AlbumArtists && item.AlbumArtists.length) {
|
if (isOuterFooter && item.AlbumArtists?.length) {
|
||||||
(item.AlbumArtists[0] as BaseItemDto).Type = BaseItemKind.MusicArtist;
|
(item.AlbumArtists[0] as BaseItemDto).Type = BaseItemKind.MusicArtist;
|
||||||
(item.AlbumArtists[0] as BaseItemDto).IsFolder = true;
|
(item.AlbumArtists[0] as BaseItemDto).IsFolder = true;
|
||||||
return getTextActionButton(item.AlbumArtists[0], null, serverId);
|
return getTextActionButton(item.AlbumArtists[0], null, serverId);
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import React, { type FC } from 'react';
|
import React, { type FC } from 'react';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import escapeHTML from 'escape-html';
|
|
||||||
import itemHelper from 'components/itemHelper';
|
import itemHelper from 'components/itemHelper';
|
||||||
import { isUsingLiveTvNaming } from '../cardbuilder/cardBuilderUtils';
|
import { isUsingLiveTvNaming } from '../cardbuilder/cardBuilderUtils';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/itemDto';
|
||||||
|
@ -15,7 +14,7 @@ const DefaultName: FC<DefaultNameProps> = ({ item }) => {
|
||||||
itemHelper.getDisplayName(item);
|
itemHelper.getDisplayName(item);
|
||||||
return (
|
return (
|
||||||
<Box className='cardText cardDefaultText'>
|
<Box className='cardText cardDefaultText'>
|
||||||
{escapeHTML(defaultName)}
|
{defaultName}
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import escapeHTML from 'escape-html';
|
|
||||||
import React, { type FC } from 'react';
|
import React, { type FC } from 'react';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
|
@ -31,7 +30,7 @@ const ListWrapper: FC<ListWrapperProps> = ({
|
||||||
'itemAction listItem-button listItem-focusscale'
|
'itemAction listItem-button listItem-focusscale'
|
||||||
)}
|
)}
|
||||||
data-action={action}
|
data-action={action}
|
||||||
aria-label={escapeHTML(title)}
|
aria-label={title}
|
||||||
{...dataAttributes}
|
{...dataAttributes}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import React, { type FC } from 'react';
|
import React, { type FC } from 'react';
|
||||||
import escapeHTML from 'escape-html';
|
|
||||||
import { groupBy } from 'lodash-es';
|
import { groupBy } from 'lodash-es';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import { getIndex } from './listHelper';
|
import { getIndex } from './listHelper';
|
||||||
|
@ -43,7 +42,7 @@ const Lists: FC<ListsProps> = ({ items = [], listOptions = {} }) => {
|
||||||
<Box key={index}>
|
<Box key={index}>
|
||||||
{itemGroupTitle && (
|
{itemGroupTitle && (
|
||||||
<ListGroupHeaderWrapper index={index}>
|
<ListGroupHeaderWrapper index={index}>
|
||||||
{escapeHTML(itemGroupTitle)}
|
{itemGroupTitle}
|
||||||
</ListGroupHeaderWrapper>
|
</ListGroupHeaderWrapper>
|
||||||
)}
|
)}
|
||||||
{getItems.map((item) => renderListItem(item, index))}
|
{getItems.map((item) => renderListItem(item, index))}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue