File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +17
-4
lines changed
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ var extendFlat = Plotly.Lib.extendFlat;
18
18
module . exports = {
19
19
font : {
20
20
family : extendFlat ( { } , fontAttrs . family , {
21
- dflt : '"Open sans ", verdana, arial, sans-serif'
21
+ dflt : '"Open Sans ", verdana, arial, sans-serif'
22
22
} ) ,
23
23
size : extendFlat ( { } , fontAttrs . size , {
24
24
dflt : 12
Original file line number Diff line number Diff line change @@ -288,8 +288,8 @@ plots.addLinks = function(gd) {
288
288
linkContainer . enter ( ) . append ( 'text' )
289
289
. classed ( 'js-plot-link-container' , true )
290
290
. style ( {
291
- 'font-family' :'"Open Sans",Arial,sans-serif' ,
292
- 'font-size' :'12px' ,
291
+ 'font-family' :'"Open Sans", Arial, sans-serif' ,
292
+ 'font-size' : '12px' ,
293
293
'fill' : Plotly . Color . defaultLine ,
294
294
'pointer-events' : 'all'
295
295
} )
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