You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I had the issue that html2canvas would not use the given proxy script to fetch SVG images. I don't know why it was built this way, but the code in imageloader.js would never allow an SVG to be fetched by the proxy.
This causes the canvas to be tainted - even when allowTaint was set to false. I updated the method to only load SVGs directly, when no proxy script has been defined.
I already created pull request #802 if you want to pull the fix into the project.
The text was updated successfully, but these errors were encountered:
I ran into the same problem! I have a svg file in a new browser.
This line: https://github.com/niklasvh/html2canvas/blob/master/src/imageloader.js#L63 if (this.isSVG(src) && !this.support.svg && !this.options.allowTaint) {
is falsy because of this.support.svg. Which is fine.
However, this line: } else if (this.isSameOrigin(src) || this.options.allowTaint === true || this.isSVG(src)) {
then is true, and loads our svg with cors set to false which per definition taints the canvas :|.
Questions:
I assume SVGContainer is for browser that don't support SVG?
Hi,
I had the issue that html2canvas would not use the given proxy script to fetch SVG images. I don't know why it was built this way, but the code in imageloader.js would never allow an SVG to be fetched by the proxy.
This causes the canvas to be tainted - even when
allowTaint
was set to false. I updated the method to only load SVGs directly, when no proxy script has been defined.I already created pull request #802 if you want to pull the fix into the project.
The text was updated successfully, but these errors were encountered: