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

Self-closing title not reported as an error when validating EPUB 3.2 #1093

Closed
JayPanoz opened this issue Dec 18, 2019 · 1 comment · Fixed by #1135
Closed

Self-closing title not reported as an error when validating EPUB 3.2 #1093

JayPanoz opened this issue Dec 18, 2019 · 1 comment · Fixed by #1135
Labels
priority: medium To be processed and published in one of the upcoming releases spec: EPUB 3.x Impacting the support of EPUB 3.x specifications status: has PR The issue is being processed in a pull request type: false-negative This issue is about invalid content being incorrectly accepted
Milestone

Comments

@JayPanoz
Copy link

Given

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title/>
</head>
<body>
</body>
</html>

validator.nu (XHTML preset) reports an error:

Error: Element title must not be empty.
From line 6, column 1; to line 6, column 8
">↩<head>↩<title/>↩</hea

But epubcheck 4.2.2 doesn’t.

Reduced test case:
selfclosingtitle.zip

@JayPanoz JayPanoz changed the title Self-closing title not reported as an error when validation EPUB 3.2 Self-closing title not reported as an error when validating EPUB 3.2 Dec 18, 2019
@rdeltour
Copy link
Member

rdeltour commented Dec 18, 2019

Thanks for the report @JayPanoz!

This check is implemented in the Nu HTML Checker as Java code (TextContentChecker.java), and until we don’t fully integrate this checker we’re only using its schemas.

For now, we can re-implement this check as a Schematron rule.

@rdeltour rdeltour added priority: medium To be processed and published in one of the upcoming releases spec: EPUB 3.x Impacting the support of EPUB 3.x specifications status: ready for implem The issue is ready to be implemented type: improvement The issue suggests an improvement of an existing feature type: false-negative This issue is about invalid content being incorrectly accepted and removed type: improvement The issue suggests an improvement of an existing feature labels Dec 18, 2019
@rdeltour rdeltour added this to the 4.2.3 milestone Dec 18, 2019
rdeltour added a commit that referenced this issue May 1, 2020
Empty or whitespace-only `title` elements are disallowed in HTML:
  https://html.spec.whatwg.org/#the-title-element

Nu HTML Checker checks this with Java Code, so it’s not exposed in
EPUBCheck (which only uses the Checkr’s schemas).
This change re-implements the check in Schematron.

Fixes #1093
@rdeltour rdeltour added status: has PR The issue is being processed in a pull request and removed status: ready for implem The issue is ready to be implemented labels May 1, 2020
rdeltour added a commit that referenced this issue May 1, 2020
Empty or whitespace-only `title` elements are disallowed in HTML:
  https://html.spec.whatwg.org/#the-title-element

Nu HTML Checker checks this with Java Code, so it’s not exposed in
EPUBCheck (which only uses the Checkr’s schemas).
This change re-implements the check in Schematron.

Fixes #1093
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium To be processed and published in one of the upcoming releases spec: EPUB 3.x Impacting the support of EPUB 3.x specifications status: has PR The issue is being processed in a pull request type: false-negative This issue is about invalid content being incorrectly accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants