Fixed regular expression for chrome

This commit is contained in:
The Brain 2011-09-12 11:22:17 +03:00
parent 958cfdf4eb
commit 180cd38265

View File

@ -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++;