tsayen / dom-to-image

Generates an image from a DOM node using HTML5 canvas
Other
10.28k stars 1.68k forks source link

URL_REGEX will not work if url with char ')' #244

Closed gui-xie closed 5 years ago

gui-xie commented 6 years ago

URL_REGEX will not work if url with char ')' . For Example: url("/test(1).jpg")

original code: var URL_REGEX = /url(['"]?([^'"]+?)['"]?)/g;

should be modified: /url(['"]?([^'"]+?)['"]?)(?:$|[\s;])/g