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: do not report fragment-only CSS URLs #1208

Merged
merged 1 commit into from Feb 26, 2021
Merged

Conversation

rdeltour
Copy link
Member

CSS defines a special processing for the resolution of fragment-only URLs.
These are resolved based on the HTML document, not relative to the
stylesheet.

For example, an SVG filter inlined in the HTML can be refered in CSS as:

* {
  filter: url(#filter);
}

Such fragment-only URLs were previously reported as errors in EPUBCheck,
since the related fragment could not be found in the CSS document!

This change fixes the issue by ignoring fragment-only URLs in CSS. In
other words, these URLs will not be registered to the XRefChecker.

Fixes #1198

CSS defines a special processing for the resolution of fragment-only URLs.
These are resolved based on the HTML document, not relative to the
stylesheet.

For example, an SVG filter inlined in the HTML can be refered in CSS as:

```
* {
  filter: url(#filter);
}
```

Such fragment-only URLs were previously reported as errors in EPUBCheck,
since the related fragment could not be found in the CSS document!

This change fixes the issue by ignoring fragment-only URLs in CSS. In
other words, these URLs will not be registered to the XRefChecker.

Fixes #1198
@rdeltour rdeltour added the status: accepted Ready to be further processed label Feb 26, 2021
@rdeltour rdeltour added this to the v4.2.5 milestone Feb 26, 2021
@rdeltour rdeltour self-assigned this Feb 26, 2021
@rdeltour rdeltour merged commit 6fa3312 into master Feb 26, 2021
@rdeltour rdeltour deleted the fix/1198/svg-filter branch February 26, 2021 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted Ready to be further processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible incorrect error reported with inline SVG and external CSS
1 participant