File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,21 @@ module.exports = function toSVG(gd, format) {
113
113
// serialized svg because the style attribute itself is double-quoted!
114
114
// Is this an IE thing? Any other attributes or style elements that can have quotes in them?
115
115
// TODO: this looks like a noop right now - what happened to it?
116
+
117
+ /*
118
+ * Font-family styles with double quotes in them breaks the to-image
119
+ * step in FF42 because the style attribute itself is wrapped in
120
+ * double quotes. See:
121
+ *
122
+ * - http://codepen.io/etpinard/pen/bEdQWK
123
+ * - https://github.com/plotly/plotly.js/pull/104
124
+ *
125
+ * for more info.
126
+ */
116
127
var ff = txt . style ( 'font-family' ) ;
117
- if ( ff && ff . indexOf ( '"' ) !== - 1 ) txt . style ( 'font-family' , ff . replace ( / " / g, '\\\'' ) ) ;
128
+ if ( ff && ff . indexOf ( '"' ) !== - 1 ) {
129
+ txt . style ( 'font-family' , ff . replace ( / " / g, '\\\'' ) ) ;
130
+ }
118
131
} ) ;
119
132
120
133
if ( format === 'pdf' || format === 'eps' ) {
You can’t perform that action at this time.
0 commit comments