-
Notifications
You must be signed in to change notification settings - Fork 407
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
feat: check that the manifest is not self-referencing #1467
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mattgarrish
reviewed
Jan 3, 2023
@@ -215,6 +215,7 @@ OPF_096=Non-linear content must be reachable, but found no hyperlink to "%1$s". | |||
OPF_096b=No hyperlink was found to non-linear document "%1$s", please check that it can be reached from scripted content. | |||
OPF_097=Resource "%1$s" is listed in the manifest, but no reference to it was found in content documents. | |||
OPF_098=The "href" attribute must not reference resources via elements in the package document itself, but found URL "%1$s". | |||
OPF_099=The package document must not include itself in its manifest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A minor clarity suggestion:
Suggested change
OPF_099=The package document must not include itself in its manifest. | |
OPF_099=The manifest must not list the package document . |
mattgarrish
approved these changes
Jan 3, 2023
rdeltour
force-pushed
the
feat/package-links
branch
2 times, most recently
from
January 3, 2023 14:31
aaed7bb
to
54b5f1f
Compare
rdeltour
force-pushed
the
feat/manifest-self-reference
branch
from
January 3, 2023 14:36
db0d027
to
c2fab31
Compare
This commit adds a new check, reported as `OPF-099` (error), to verify that the package document `manifest` does not include an `item` element that refers to the package document itself. This statement was apparently not checked by EPUBCheck previously. Worse, the code was entering an infinite loop, as the package document checker was creating a new checker for itself, recursively. Fix #1453
rdeltour
force-pushed
the
feat/manifest-self-reference
branch
from
January 3, 2023 14:36
c2fab31
to
2c76420
Compare
rdeltour
added a commit
that referenced
this pull request
Jul 6, 2023
--------------------- Add `plaintext-only` value to `contenteditable` attribute validator/validator@228ea687b Co-authored-by: Niedziolka Michal <[email protected]> --------------------- add warnings for deprecated ARIA attributes (#1560) validator/validator@e61fbeb2c Co-authored-by: Steve Faulkner <[email protected]> --------------------- disallow aria attributes on datalist (#1557) validator/validator@b4849c04b Co-authored-by: Steve Faulkner <[email protected]> --------------------- allow role=button on area validator/validator@89ff1fc2b Co-authored-by: stevefaulkner <[email protected]> --------------------- fix: allow -1 for aria-colcount validator/validator@2466e73c4 Co-authored-by: Nick Schonning <[email protected]> --------------------- fix: Allow -1 for aria-rowcount validator/validator@eac205b6b Co-authored-by: Nick Schonning <[email protected]> --------------------- Add `fetchpriority` attribute validator/validator@7c9991405 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Script type importmap (#1478) validator/validator@4054c56f5 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- Move “manifest” attribute to legacy-attributes list validator/validator@175e62d3a Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- Pointer Events (#1481) validator/validator@5eb52a931 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- Report a better error message for obsolete “manifest” attribute validator/validator@ae924b625 Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- onscrollend validator/validator@87287a97f Co-authored-by: Niedziolka Michal <[email protected]> --------------------- slot element validator/validator@d6cf423c1 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Allow paragraphs in hgroup (#1467) validator/validator@3ff53973f Co-authored-by: Michał Niedziółka <[email protected]> --------------------- blocking="render" (#1466) validator/validator@df5d4e23a Co-authored-by: Michał Niedziółka <[email protected]> --------------------- inert validator/validator@507f551b2 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- hidden=until-found validator/validator@a424d55a8 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- media attribute in meta element validator/validator@af3e94d22 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Sync event handlers validator/validator@58bea51c7 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Remove manifest attribute validator/validator@66510f3ca Co-authored-by: Niedziolka Michal <[email protected]> --------------------- enterkeyhint validator/validator@70f3044d7 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Form method dialog (#1443) validator/validator@0db229a44 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- imagesrcset and imagesizes in link (#1444) validator/validator@49656dbfc Co-authored-by: Michał Niedziółka <[email protected]> --------------------- feat: add support width and height of source in picture validator/validator@176d98e4f Co-authored-by: Takeshi Kurosawa <[email protected]> --------------------- Update: allow none/presentation on nav element (#1323) validator/validator@5e25edb39 Co-authored-by: Scott O'Hara <[email protected]> --------------------- Update schema/html5/web-forms.rnc validator/validator@95ba6c7cf Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- update role allowances for button and input type=button validator/validator@6cc14c4d7 Co-authored-by: Scott O'Hara <[email protected]> --------------------- adds role=radio alowance to img alt=foo validator/validator@b013aa02b Co-authored-by: Scott O'Hara <[email protected]> --------------------- remove deprecated dpub role allowances validator/validator@b0fb152c0 Co-authored-by: Scott O'Hara <[email protected]> --------------------- allow section element to have role=group validator/validator@078341d37 Co-authored-by: Scott O'Hara <[email protected]>
rdeltour
added a commit
that referenced
this pull request
Jul 7, 2023
--------------------- Add `plaintext-only` value to `contenteditable` attribute validator/validator@228ea687b Co-authored-by: Niedziolka Michal <[email protected]> --------------------- add warnings for deprecated ARIA attributes (#1560) validator/validator@e61fbeb2c Co-authored-by: Steve Faulkner <[email protected]> --------------------- disallow aria attributes on datalist (#1557) validator/validator@b4849c04b Co-authored-by: Steve Faulkner <[email protected]> --------------------- allow role=button on area validator/validator@89ff1fc2b Co-authored-by: stevefaulkner <[email protected]> --------------------- fix: allow -1 for aria-colcount validator/validator@2466e73c4 Co-authored-by: Nick Schonning <[email protected]> --------------------- fix: Allow -1 for aria-rowcount validator/validator@eac205b6b Co-authored-by: Nick Schonning <[email protected]> --------------------- Add `fetchpriority` attribute validator/validator@7c9991405 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Script type importmap (#1478) validator/validator@4054c56f5 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- Move “manifest” attribute to legacy-attributes list validator/validator@175e62d3a Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- Pointer Events (#1481) validator/validator@5eb52a931 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- Report a better error message for obsolete “manifest” attribute validator/validator@ae924b625 Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- onscrollend validator/validator@87287a97f Co-authored-by: Niedziolka Michal <[email protected]> --------------------- slot element validator/validator@d6cf423c1 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Allow paragraphs in hgroup (#1467) validator/validator@3ff53973f Co-authored-by: Michał Niedziółka <[email protected]> --------------------- blocking="render" (#1466) validator/validator@df5d4e23a Co-authored-by: Michał Niedziółka <[email protected]> --------------------- inert validator/validator@507f551b2 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- hidden=until-found validator/validator@a424d55a8 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- media attribute in meta element validator/validator@af3e94d22 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Sync event handlers validator/validator@58bea51c7 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Remove manifest attribute validator/validator@66510f3ca Co-authored-by: Niedziolka Michal <[email protected]> --------------------- enterkeyhint validator/validator@70f3044d7 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Form method dialog (#1443) validator/validator@0db229a44 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- imagesrcset and imagesizes in link (#1444) validator/validator@49656dbfc Co-authored-by: Michał Niedziółka <[email protected]> --------------------- feat: add support width and height of source in picture validator/validator@176d98e4f Co-authored-by: Takeshi Kurosawa <[email protected]> --------------------- Update: allow none/presentation on nav element (#1323) validator/validator@5e25edb39 Co-authored-by: Scott O'Hara <[email protected]> --------------------- Update schema/html5/web-forms.rnc validator/validator@95ba6c7cf Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- update role allowances for button and input type=button validator/validator@6cc14c4d7 Co-authored-by: Scott O'Hara <[email protected]> --------------------- adds role=radio alowance to img alt=foo validator/validator@b013aa02b Co-authored-by: Scott O'Hara <[email protected]> --------------------- remove deprecated dpub role allowances validator/validator@b0fb152c0 Co-authored-by: Scott O'Hara <[email protected]> --------------------- allow section element to have role=group validator/validator@078341d37 Co-authored-by: Scott O'Hara <[email protected]>
rdeltour
added a commit
that referenced
this pull request
Jul 7, 2023
--------------------- Add `plaintext-only` value to `contenteditable` attribute validator/validator@228ea687b Co-authored-by: Niedziolka Michal <[email protected]> --------------------- add warnings for deprecated ARIA attributes (#1560) validator/validator@e61fbeb2c Co-authored-by: Steve Faulkner <[email protected]> --------------------- disallow aria attributes on datalist (#1557) validator/validator@b4849c04b Co-authored-by: Steve Faulkner <[email protected]> --------------------- allow role=button on area validator/validator@89ff1fc2b Co-authored-by: stevefaulkner <[email protected]> --------------------- fix: allow -1 for aria-colcount validator/validator@2466e73c4 Co-authored-by: Nick Schonning <[email protected]> --------------------- fix: Allow -1 for aria-rowcount validator/validator@eac205b6b Co-authored-by: Nick Schonning <[email protected]> --------------------- Add `fetchpriority` attribute validator/validator@7c9991405 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Script type importmap (#1478) validator/validator@4054c56f5 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- Move “manifest” attribute to legacy-attributes list validator/validator@175e62d3a Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- Pointer Events (#1481) validator/validator@5eb52a931 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- Report a better error message for obsolete “manifest” attribute validator/validator@ae924b625 Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- onscrollend validator/validator@87287a97f Co-authored-by: Niedziolka Michal <[email protected]> --------------------- slot element validator/validator@d6cf423c1 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Allow paragraphs in hgroup (#1467) validator/validator@3ff53973f Co-authored-by: Michał Niedziółka <[email protected]> --------------------- blocking="render" (#1466) validator/validator@df5d4e23a Co-authored-by: Michał Niedziółka <[email protected]> --------------------- inert validator/validator@507f551b2 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- hidden=until-found validator/validator@a424d55a8 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- media attribute in meta element validator/validator@af3e94d22 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Sync event handlers validator/validator@58bea51c7 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Remove manifest attribute validator/validator@66510f3ca Co-authored-by: Niedziolka Michal <[email protected]> --------------------- enterkeyhint validator/validator@70f3044d7 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Form method dialog (#1443) validator/validator@0db229a44 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- imagesrcset and imagesizes in link (#1444) validator/validator@49656dbfc Co-authored-by: Michał Niedziółka <[email protected]> --------------------- feat: add support width and height of source in picture validator/validator@176d98e4f Co-authored-by: Takeshi Kurosawa <[email protected]> --------------------- Update: allow none/presentation on nav element (#1323) validator/validator@5e25edb39 Co-authored-by: Scott O'Hara <[email protected]> --------------------- Update schema/html5/web-forms.rnc validator/validator@95ba6c7cf Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- update role allowances for button and input type=button validator/validator@6cc14c4d7 Co-authored-by: Scott O'Hara <[email protected]> --------------------- adds role=radio alowance to img alt=foo validator/validator@b013aa02b Co-authored-by: Scott O'Hara <[email protected]> --------------------- remove deprecated dpub role allowances validator/validator@b0fb152c0 Co-authored-by: Scott O'Hara <[email protected]> --------------------- allow section element to have role=group validator/validator@078341d37 Co-authored-by: Scott O'Hara <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds a new check, reported as
OPF-099
(error), to verify that the package documentmanifest
does not include anitem
element that refers to the package document itself.This statement was apparently not checked by EPUBCheck previously. Worse, the code was entering an infinite loop, as the package document checker was creating a new checker for itself, recursively.
Fix #1453