Skip to content

Commit

Permalink
refactor: use stringToHTML instead of parse
Browse files Browse the repository at this point in the history
  • Loading branch information
pranita09 committed Dec 17, 2024
1 parent 0f0e358 commit f762c9a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { FilterOutlined } from '@ant-design/icons';
import { Button, Form, Select, Tooltip, Typography } from 'antd';
import { ColumnsType } from 'antd/lib/table';
import { ExpandableConfig } from 'antd/lib/table/interface';
import parse from 'html-react-parser';
import {
cloneDeep,
groupBy,
Expand Down Expand Up @@ -60,6 +59,7 @@ import {
searchInColumns,
} from '../../../utils/EntityUtils';
import { getEntityColumnFQN } from '../../../utils/FeedUtils';
import { stringToHTML } from '../../../utils/StringsUtils';
import {
getAllTags,
searchTagInData,
Expand Down Expand Up @@ -251,7 +251,7 @@ const SchemaTable = ({
<Typography.Paragraph
className="cursor-pointer"
ellipsis={{ tooltip: displayValue, rows: 3 }}>
{parse(highlightSearchText(displayValue, searchText))}
{stringToHTML(highlightSearchText(displayValue, searchText))}
</Typography.Paragraph>
);
};
Expand Down Expand Up @@ -376,15 +376,15 @@ const SchemaTable = ({
<Typography.Text
className="m-b-0 d-block text-grey-muted break-word"
data-testid="column-name">
{parse(highlightSearchText(name, searchText))}
{stringToHTML(highlightSearchText(name, searchText))}
</Typography.Text>
</div>
{!isEmpty(displayName) ? (
// It will render displayName fallback to name
<Typography.Text
className="m-b-0 d-block break-word"
data-testid="column-display-name">
{parse(
{stringToHTML(
highlightSearchText(getEntityName(record), searchText)
)}
</Typography.Text>
Expand Down

0 comments on commit f762c9a

Please sign in to comment.