Skip to content

Commit 8f38703

Browse files
committed
Replace all special symbols in object name/class
Let easier use regex to remove such attributes later
1 parent 4df79d8 commit 8f38703

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/JSRoot.painter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,8 +2066,8 @@ JSROOT.define(['d3'], (d3) => {
20662066

20672067
// set attributes for debugging
20682068
if (this.draw_object) {
2069-
this.draw_g.attr('objname', encodeURI(this.draw_object.fName || "name"));
2070-
this.draw_g.attr('objtype', encodeURI(this.draw_object._typename || "type"));
2069+
this.draw_g.attr('objname', (this.draw_object.fName || "name").replace(/[^\w]/g, '_'));
2070+
this.draw_g.attr('objtype', (this.draw_object.fName || "name").replace(/[^\w]/g, '_'));
20712071
}
20722072

20732073
this.draw_g.property('in_frame', !!frame_layer); // indicates coordinate system

0 commit comments

Comments
 (0)