Skip to content

Commit 62cf070

Browse files
code cleanup
1 parent 3b58bf8 commit 62cf070

File tree

3 files changed

+1
-19
lines changed

3 files changed

+1
-19
lines changed

src/chart/graph/component/GraphEntityInspectionTable.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ export const formatProperty = (property) => {
1414
);
1515
}
1616
return str;
17-
18-
// html render rollback
19-
// const cleanValue = DOMPurify.sanitize(str);
20-
// return <div dangerouslySetInnerHTML={{ __html: cleanValue }} />;
2117
};
2218

2319
/**
@@ -94,8 +90,7 @@ export const GraphEntityInspectionTable = ({
9490
{key}
9591
</TableCell>
9692
<TableCell align={'left'} style={{ color: tableTextColor }}>
97-
<ShowMoreText lines={2}>{formatProperty(entity && entity.properties[key].toString())}</ShowMoreText>
98-
{/* <ShowMoreText lines={2}>{formatProperty(entity?.properties[key])}</ShowMoreText> */}
93+
<ShowMoreText lines={2}>{formatProperty(entity?.properties[key])}</ShowMoreText>
9994
</TableCell>
10095
{checklistEnabled ? (
10196
<TableCell align={'center'}>

src/chart/table/TableChart.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,6 @@ const fallbackRenderer = (value) => {
3838
return JSON.stringify(value);
3939
};
4040

41-
// html Render Rollback
42-
// function htmlToPlainText(html): string {
43-
// // Create a temporary div element to hold the sanitized HTML content
44-
// const tempElement = document.createElement('div');
45-
// // Set the HTML content directly as innerHTML of the temporary element
46-
// tempElement.innerHTML = html.props.dangerouslySetInnerHTML.__html;
47-
// // Extract plain text using textContent
48-
// return tempElement.textContent ?? '';
49-
// }
50-
5141
function renderAsButtonWrapper(renderer) {
5242
return function renderAsButton(value) {
5343
const outputValue = renderer(value, true);

src/report/ReportRecordProcessing.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,6 @@ function RenderString(value) {
268268
);
269269
}
270270
return str;
271-
// html render rollback
272-
// const cleanValue = DOMPurify.sanitize(str);
273-
// return <div dangerouslySetInnerHTML={{ __html: cleanValue }} />;
274271
}
275272

276273
function RenderLink(value, disabled = false) {

0 commit comments

Comments
 (0)