Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: Thread Title not being escaped #18356

Merged
merged 1 commit into from Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions client/channel/Discussions/ContextualBar/List.js
Expand Up @@ -13,7 +13,6 @@ import { getConfig } from '../../../../app/ui-utils/client/config';
import { Messages } from '../../../../app/models/client';
import VerticalBar from '../../../components/basic/VerticalBar';
import { useTranslation } from '../../../contexts/TranslationContext';
import RawText from '../../../components/basic/RawText';
import { useUserId } from '../../../contexts/UserContext';
import { useEndpointDataExperimental, ENDPOINT_STATES } from '../../../hooks/useEndpointDataExperimental';
import { useTimeAgo } from '../../../hooks/useTimeAgo';
Expand Down Expand Up @@ -188,7 +187,7 @@ export function DiscussionList({ total = 10, discussions = [], loadMoreItems, lo
return <VerticalBar>
<VerticalBar.Header>
<VerticalBar.Icon name='discussion'/>
<Box flexShrink={1} flexGrow={1} withTruncatedText mi='x8'><RawText>{t('Discussions')}</RawText></Box>
<Box flexShrink={1} flexGrow={1} withTruncatedText mi='x8'>{t('Discussions')}</Box>
<VerticalBar.Close onClick={onClose}/>
</VerticalBar.Header>
<VerticalBar.Content paddingInline={0}>
Expand Down
3 changes: 1 addition & 2 deletions client/channel/Threads/ContextualBar/List.js
Expand Up @@ -9,7 +9,6 @@ import { useDebouncedValue, useDebouncedState, useResizeObserver, useLocalStorag

import VerticalBar from '../../../components/basic/VerticalBar';
import { useTranslation } from '../../../contexts/TranslationContext';
import RawText from '../../../components/basic/RawText';
import { useRoute, useCurrentRoute } from '../../../contexts/RouterContext';
import { call, renderMessageBody } from '../../../../app/ui-utils/client';
import { useUserId } from '../../../contexts/UserContext';
Expand Down Expand Up @@ -211,7 +210,7 @@ export function ThreadList({ total = 10, threads = [], room, unread = [], unread
return <VerticalBar>
<VerticalBar.Header>
<Icon name='thread' size='x20'/>
<Box flexShrink={1} flexGrow={1} withTruncatedText mi='x8'><RawText>{t('Threads')}</RawText></Box>
<Box flexShrink={1} flexGrow={1} withTruncatedText mi='x8'>{t('Threads')}</Box>
<VerticalBar.Close onClick={onClose}/>
</VerticalBar.Header>
<VerticalBar.Content paddingInline={0}>
Expand Down
5 changes: 2 additions & 3 deletions client/components/basic/VerticalBar.js
Expand Up @@ -3,7 +3,6 @@ import { useDebouncedValue, useMediaQuery } from '@rocket.chat/fuselage-hooks';
import React from 'react';

import Page from './Page';
import RawText from './RawText';

function VerticalBar({ children, ...props }) {
const mobile = useDebouncedValue(useMediaQuery('(max-width: 500px)'), 50);
Expand Down Expand Up @@ -79,8 +78,8 @@ function VerticalBarSkeleton(props) {
</VerticalBar>;
}

function VerticalBarText({ children, ...props }) {
return <Box flexShrink={1} flexGrow={1} withTruncatedText {...props}><RawText>{children}</RawText></Box>;
function VerticalBarText(props) {
return <Box flexShrink={1} flexGrow={1} withTruncatedText {...props}/>;
}

VerticalBar.Icon = React.memo(VerticalBarIcon);
Expand Down