mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Fixed regular expression for chrome
This commit is contained in:
parent
958cfdf4eb
commit
180cd38265
@ -313,7 +313,6 @@ html2canvas.prototype.drawBackground = function(el,bounds,ctx){
|
||||
background_image = this.backgroundImageUrl(background_image);
|
||||
var image = this.loadImage(background_image);
|
||||
|
||||
|
||||
var bgp = this.getBackgroundPosition(el,bounds,image),
|
||||
bgy;
|
||||
|
||||
@ -1006,7 +1005,7 @@ html2canvas.prototype.preloadImage = function(src){
|
||||
if (this.getIndex(this.images,src)==-1){
|
||||
if (src.match(/data:image\/.*;base64,/i)) {
|
||||
var img = new Image();
|
||||
img.src = src.replace(/url\(['"]|['"]\)$/img, '');
|
||||
img.src = src.replace(/url\(['"]{0,}|['"]{0,}\)$/ig, '');
|
||||
this.images.push(src);
|
||||
this.images.push(img);
|
||||
this.imagesLoaded++;
|
||||
|
Loading…
Reference in New Issue
Block a user