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: disallow epub:prefix on embedded SVG #1583

Open
wants to merge 5 commits into
base: fix/1536/data-url-npe
Choose a base branch
from

Conversation

rdeltour
Copy link
Member

Also disallow unknown epub:* attributes in SVG

- Introduce a new improved structure to the feature file,
based on a list of Rules each having one or several Examples.

Each Rule matches a normative statement in the specification.
Examples are previous Scenarios (both keywords are synonyms), but now
better grouped under each normative statement it relates to.

- Also move a couple prefix-related test cases to the general vocabularies
feature, for keeping closer to the specification.

- Add a few tests cases for some untested statements.
EPUB 3 Vocabularies section currently contains the following statemnt:

> For future compatibility with alternative serializations of the package
> document, EPUB creators MUST NOT declare a prefix for the Dublin Core
> `/elements/1.1/` namespace.

This commit implements a check for that statement in the prefix parsing
code, reported as a new error message OPF-007c.
The spec only requires SVG to be well-formed, but one can argue that
attributes in the EPUB namespace can only be defined by the EPUB specs
and therefore should still be validated.

For instance, EPUB already specifies where `epub:type` is allowed in SVG,
as a normative statement.

This commit updates the persmissive SVG schema to reject all attributes
in the `http://www.idpf.org/2007/ops` namespace except the known ones.
@rdeltour rdeltour added the status: ready to merge The pull request is ready to be merged label Dec 23, 2024
@rdeltour rdeltour added this to the Next maintenance release milestone Dec 23, 2024
@rdeltour rdeltour requested a review from mattgarrish December 23, 2024 10:18
@rdeltour rdeltour self-assigned this Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready to merge The pull request is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant