Skip to content

Commit d6e19f3

Browse files
committed
Use text() instead of html() in display
1 parent 1027968 commit d6e19f3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/gui/display.mjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ class TabsDisplay extends MDIDisplay {
713713
}).append('button')
714714
.attr('title', 'close')
715715
.attr('style', 'margin-left: .5em; padding: 0; font-size: 0.5em; width: 1.8em; height: 1.8em; vertical-align: center;')
716-
.html('✕')
716+
.text('\u2715')
717717
.on('click', function() {
718718
mdi.modifyTabsFrame(d3_select(this.parentNode).property('frame_id'), 'close');
719719
});
@@ -866,9 +866,9 @@ class FlexibleDisplay extends MDIDisplay {
866866
const btn = d3_select(this);
867867
if (((d.t === 'minimize') && (newstate === 'min')) ||
868868
((d.t === 'maximize') && (newstate === 'max')))
869-
btn.html('▞').attr('title', 'restore');
869+
btn.text('\u259E').attr('title', 'restore');
870870
else
871-
btn.html(d.n).attr('title', d.t);
871+
btn.text(d.n).attr('title', d.t);
872872
});
873873

874874
main.property('state', newstate);
@@ -978,13 +978,13 @@ class FlexibleDisplay extends MDIDisplay {
978978
.on('contextmenu', evnt => mdi.showContextMenu(evnt, true))
979979
.on('click', function() { mdi.activateFrame(d3_select(this.parentNode).select('.jsroot_flex_draw').node()); })
980980
.selectAll('button')
981-
.data([{ n: '✕', t: 'close' }, { n: '▔', t: 'maximize' }, { n: '▁', t: 'minimize' }])
981+
.data([{ n: '\u2715', t: 'close' }, { n: '\u2594', t: 'maximize' }, { n: '\u2581', t: 'minimize' }])
982982
.enter()
983983
.append('button')
984984
.attr('type', 'button')
985985
.attr('style', 'float: right; padding: 0; width: 1.4em; text-align: center; font-size: 10px; margin-top: 2px; margin-right: 4px')
986986
.attr('title', d => d.t)
987-
.html(d => d.n)
987+
.text(d => d.n)
988988
.on('click', function() { mdi._clickButton(this); });
989989

990990
let moving_frame = null, moving_div = null, doing_move = false, current = [];
@@ -1240,7 +1240,7 @@ class BatchDisplay extends MDIDisplay {
12401240
return Promise.all(prs).then(() => {
12411241
this.jsdom_body.append('div')
12421242
.attr('id', 'jsroot_batch_final')
1243-
.html(`${cnt}`);
1243+
.text(`${cnt}`);
12441244
});
12451245
}
12461246

0 commit comments

Comments
 (0)