@@ -529,7 +529,7 @@ function objectHierarchy(top, obj, args = undefined) {
529529 item . _vclass = 'h_value_num' ;
530530 } else if ( isStr ( fld ) ) {
531531 simple = true ;
532- item . _value = '" ' + fld . replace ( / & / g , '&' ) . replace ( / " / g , '"' ) . replace ( / < / g , '<' ) . replace ( / > / g , '>' ) + '" ' ;
532+ item . _value = '" ' + fld + '" ' ;
533533 item . _vclass = 'h_value_str' ;
534534 } else if ( typeof fld === 'undefined' ) {
535535 simple = true ;
@@ -1295,8 +1295,10 @@ class HierarchyPainter extends BasePainter {
12951295
12961296 if ( '_value' in hitem ) {
12971297 const d3p = d3line . append ( 'p' ) ;
1298- if ( '_vclass' in hitem ) d3p . attr ( 'class' , hitem . _vclass ) ;
1299- if ( ! hitem . _isopen ) d3p . html ( hitem . _value ) ;
1298+ if ( '_vclass' in hitem )
1299+ d3p . attr ( 'class' , hitem . _vclass ) ;
1300+ if ( ! hitem . _isopen )
1301+ d3p . text ( hitem . _value ) ;
13001302 }
13011303
13021304 if ( has_childs && ( isroot || hitem . _isopen ) ) {
@@ -3848,7 +3850,7 @@ class HierarchyPainter extends BasePainter {
38483850 const layout = main . select ( '.gui_layout' ) ;
38493851 if ( ! layout . empty ( ) ) {
38503852 [ 'simple' , 'vert2' , 'vert3' , 'vert231' , 'horiz2' , 'horiz32' , 'flex' , 'tabs' ,
3851- 'grid 2x2' , 'grid 1x3' , 'grid 2x3' , 'grid 3x3' , 'grid 4x4' ] . forEach ( kind => layout . append ( 'option' ) . attr ( 'value' , kind ) . html ( kind ) ) ;
3853+ 'grid 2x2' , 'grid 1x3' , 'grid 2x3' , 'grid 3x3' , 'grid 4x4' ] . forEach ( kind => layout . append ( 'option' ) . attr ( 'value' , kind ) . text ( kind ) ) ;
38523854
38533855 layout . on ( 'change' , ev => {
38543856 const kind = ev . target . value || 'flex' ;
@@ -3888,7 +3890,7 @@ class HierarchyPainter extends BasePainter {
38883890 }
38893891 if ( ! found ) {
38903892 const opt = document . createElement ( 'option' ) ;
3891- opt . innerHTML = opt . value = this . getLayout ( ) ;
3893+ opt . innerText = opt . value = this . getLayout ( ) ;
38923894 selects . appendChild ( opt ) ;
38933895 selects . selectedIndex = selects . options . length - 1 ;
38943896 }
0 commit comments