Skip to content

CSSUrl, remove quotes from the URL kept in .value #259

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

Merged
merged 1 commit into from
Oct 23, 2019

Conversation

hannibal218bc
Copy link
Contributor

Previously, CSSUrl.value was stored verbatim, including any quotes around the actual value in url( ... ).
As .value is also used in getURL(), the resulting resolved URL included those quotes, which is wrong.

Example:

* {background: url("file.png");

With a base of http://www.example.org, the result from getURL() was http://www.example.org/"file.png".

This pull request modifies CSSUrl to remove balanced quotes from the input value before it is stored.
Admittedly, it has the side effect of removing the quotes also from the output of toString(), but they are optional and not needed anyways.

@ylafon ylafon merged commit abeca29 into w3c:master Oct 23, 2019
ylafon added a commit that referenced this pull request Oct 23, 2019
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.

2 participants