File tree Expand file tree Collapse file tree
components/PgTree/FileTreeX Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,13 +96,13 @@ PolyLine.propTypes = {
9696
9797function Multitext ( { currentXpos, currentYpos, label, maxWidth} ) {
9898 const theme = useTheme ( ) ;
99- let abc = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ;
99+ const abc = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ;
100100 let xmlns = 'http://www.w3.org/2000/svg' ;
101101 let svgElem = document . createElementNS ( xmlns , 'svg' ) ;
102102 svgElem . setAttributeNS ( xmlns , 'height' , '100%' ) ;
103103 svgElem . setAttributeNS ( xmlns , 'width' , '100%' ) ;
104104 let text = document . createElementNS ( xmlns , 'text' ) ;
105- text . innerHTML = abc ;
105+ text . textContent = abc ;
106106 text . setAttributeNS ( xmlns , 'x' , 0 ) ;
107107 text . setAttributeNS ( xmlns , 'y' , 0 ) ;
108108 let attributes = {
Original file line number Diff line number Diff line change @@ -458,7 +458,7 @@ export class FileTreeX extends React.Component<IFileTreeXProps> {
458458 if ( typeof ( label ) == 'object' && label . label ) {
459459 label = label . label ;
460460 }
461- label$ . innerHTML = label ;
461+ label$ . textContent = label ;
462462 }
463463
464464 }
@@ -476,9 +476,9 @@ export class FileTreeX extends React.Component<IFileTreeXProps> {
476476 ref . style . background = 'none' ;
477477 const label$ = ref . querySelector ( 'span.children-count' ) as HTMLDivElement ;
478478 if ( dir . children && dir . children . length > 0 ) {
479- label$ . innerHTML = '(' + dir . children . length + ')' ;
479+ label$ . textContent = '(' + dir . children . length + ')' ;
480480 } else {
481- label$ . innerHTML = '' ;
481+ label$ . textContent = '' ;
482482 }
483483 }
484484 }
You can’t perform that action at this time.
0 commit comments