Skip to content

Commit 0b266b7

Browse files
committed
Fix - avoid special symbols in SVG attributes
Object painter set just informative attributes with object names and types. If they include special symbols (like <), this makes problematic to convert them in plain SVG and then PNG.
1 parent 0be53c6 commit 0b266b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/JSRootPainter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,8 +1384,8 @@
13841384

13851385
// set attributes for debugging
13861386
if (this.draw_object!==null) {
1387-
this.draw_g.attr('objname', this.draw_object.fName || "name");
1388-
this.draw_g.attr('objtype', this.draw_object._typename || "type");
1387+
this.draw_g.attr('objname', encodeURI(this.draw_object.fName || "name"));
1388+
this.draw_g.attr('objtype', encodeURI(this.draw_object._typename || "type"));
13891389
}
13901390

13911391
return this.draw_g;

0 commit comments

Comments
 (0)