diff --git a/src/Parse.js b/src/Parse.js index 1bca773..583e245 100644 --- a/src/Parse.js +++ b/src/Parse.js @@ -77,6 +77,9 @@ _html2canvas.Parse = function (images, options, cb) { for (i = 0, j = classes.length; i < j; i++) { classes[i] = classes[i].match(/(^[^:]*)/)[1]; } + + // remove empty values, if not could cause invalid selectors with querySelectorAll + classes = classes.filter(function (n) { return n }); } // Using the list of elements we know how pseudo el styles, create fake pseudo elements. @@ -1273,4 +1276,4 @@ _html2canvas.Parse = function (images, options, cb) { } } } -}; \ No newline at end of file +};