-
Notifications
You must be signed in to change notification settings - Fork 97
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
Handle SVG mask URL with encoded anchor #98
Conversation
Hello @thibaudgg, thanks for checking Propshaft. Two questions: 1 - The test for this compiler should use only CSS rules and attributes, since those are the files that the compiler is applicable to, but you seem to have used an HTML tag. Can you show a longer example of how this would be used in an CSS file? 2 - |
Hey @brenogazzola, thanks for your quick reply.
Yeah, my bad, the example using an svg tag is confusing, it looks like something like that in the CSS file:
Should we just go with
Mmm, the regex only checks |
Thanks, that makes it easier to understand. Let's shorten your example ( compiled = compile_asset_with_content(%({ background: url("data:image/svg+xml;charset=utf-8,%3Csvg mask='url(%23cMyMask)'%3E%3C/svg%3E"); })) |
This patch ensures that CSS assets with inlined SVG containing a mask URL with an HTML encoded anchor are properly handled by the `CssAssetUrls` compiler. This avoids printing warning message like: ``` Unable to resolve '%23c' for missing asset '%23c' in XYZ.css ```
9afb6e5
to
43ca471
Compare
Yeah, your example is better. I updated the PR and went with just |
Thank you! |
@brenogazzola thank you for reviewing and merging my PR so quickly! 👍🏻 |
This patch ensures that CSS assets with inlined SVG containing a mask
URL with an HTML encoded anchor are properly handled by the
CssAssetUrls
compiler.This avoids printing warning messages like: