From e74ab55be671e7803965881d9a0bd4d1d39c17b6 Mon Sep 17 00:00:00 2001 From: MoyuScript Date: Mon, 12 Sep 2011 11:22:17 +0300 Subject: [PATCH] Fixed regular expression for chrome --- build/html2canvas.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/html2canvas.js b/build/html2canvas.js index 49fd0c8..790163b 100644 --- a/build/html2canvas.js +++ b/build/html2canvas.js @@ -312,7 +312,6 @@ html2canvas.prototype.drawBackground = function(el,bounds,ctx){ if (typeof background_image != "undefined" && /^(1|none)$/.test(background_image)==false && /^(-webkit|-moz|linear-gradient|-o-)/.test(background_image)==false){ 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++;