Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:url not match correctly when the url include brackets #204

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RolandMa1986
Copy link

We are using dom-to-image-more in an electron app. So all the resources are loaded from the local file system. We found that the 'URL_REGEX' not handle the url correctly when the url include brackets.
such as:

@font-face { font-family: codicon; font-display: block; src: url("file:///C:/Program%20Files%20(x86)/<app>/resources/app/lib/frontend/front.ttf") format("truetype"); }

The solution is that matching the quote in the first place after left bracket and should be matched before right bracket.

@RolandMa1986
Copy link
Author

hi @IDisposable,
Can you help review the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant