File tree 1 file changed +1
-7
lines changed
1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 421
421
node . setAttribute ( 'xmlns' , 'http://www.w3.org/1999/xhtml' ) ;
422
422
return new XMLSerializer ( ) . serializeToString ( node ) ;
423
423
} )
424
- . then ( util . escapeXhtml )
425
424
. then ( function ( xhtml ) {
426
425
return '<foreignObject x="0" y="0" width="100%" height="100%">' + xhtml + '</foreignObject>' ;
427
426
} )
430
429
foreignObject + '</svg>' ;
431
430
} )
432
431
. then ( function ( svg ) {
433
- return 'data:image/svg+xml;charset=utf-8,' + svg ;
432
+ return encodeURI ( 'data:image/svg+xml;charset=utf-8,' ) + encodeURIComponent ( svg ) ;
434
433
} ) ;
435
434
}
436
435
447
446
uid : uid ( ) ,
448
447
delay : delay ,
449
448
asArray : asArray ,
450
- escapeXhtml : escapeXhtml ,
451
449
makeImage : makeImage ,
452
450
width : width ,
453
451
height : height
636
634
return array ;
637
635
}
638
636
639
- function escapeXhtml ( string ) {
640
- return string . replace ( / # / g, '%23' ) . replace ( / \n / g, '%0A' ) ;
641
- }
642
-
643
637
function width ( node ) {
644
638
var leftBorder = px ( node , 'border-left-width' ) ;
645
639
var rightBorder = px ( node , 'border-right-width' ) ;
You can’t perform that action at this time.
0 commit comments