Fixed regular expression for chrome

This commit is contained in:
MoyuScript 2011-09-12 11:22:17 +03:00
parent 39551dac1f
commit e74ab55be6

View File

@ -313,7 +313,6 @@ html2canvas.prototype.drawBackground = function(el,bounds,ctx){
background_image = this.backgroundImageUrl(background_image); background_image = this.backgroundImageUrl(background_image);
var image = this.loadImage(background_image); var image = this.loadImage(background_image);
var bgp = this.getBackgroundPosition(el,bounds,image), var bgp = this.getBackgroundPosition(el,bounds,image),
bgy; bgy;
@ -1006,7 +1005,7 @@ html2canvas.prototype.preloadImage = function(src){
if (this.getIndex(this.images,src)==-1){ if (this.getIndex(this.images,src)==-1){
if (src.match(/data:image\/.*;base64,/i)) { if (src.match(/data:image\/.*;base64,/i)) {
var img = new Image(); 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(src);
this.images.push(img); this.images.push(img);
this.imagesLoaded++; this.imagesLoaded++;