-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
BUG: CSS strings truncated at ":" #59720
BUG: CSS strings truncated at ":" #59720
Conversation
needs a unit test to demonstrate it solves the test |
Same behavior as before patch
@attack68 the failing test seems unralated to my change? I'm not sure how to proceed. The pre-commit.ci is failing but I'm not sure how to fix. I think it fails due to this string. msg = (
"Styles supplied as string must follow CSS rule formats, "
"for example 'attr: val;'. 'err' was given."
) |
|
* black test_style * Update style_render.py
Thanks. It looks good now I think :) |
Thanks. LGTM. |
Thanks @invalidarg |
Fixes issue #59623
Changes
maybe_convert_css_to_tuples
called bystyle.map()
so that it no longer truncates the CSS-value at the ":".e.g.
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-dk" viewBox="0 0 640 480"><path fill="%23c8102e" d="M0 0h640.1v480H0z"/><path fill="%23fff" d="M205.7 0h68.6v480h-68.6z"/><path fill="%23fff" d="M0 205.7h640.1v68.6H0z"/></svg>');
will no longer be truncated to the tuple("background-image" , "url('data:")