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

Enhanced URL checks #708

Closed
tofi86 opened this issue Sep 21, 2016 · 3 comments · Fixed by #731
Closed

Enhanced URL checks #708

tofi86 opened this issue Sep 21, 2016 · 3 comments · Fixed by #731
Assignees
Labels
status: has PR The issue is being processed in a pull request type: improvement The issue suggests an improvement of an existing feature
Milestone

Comments

@tofi86
Copy link
Collaborator

tofi86 commented Sep 21, 2016

When having an invalid link / uri in your (EPUB 2) XHTML data:

<a href="https:/www.youtube.com/watch?v=xxxxxxxxxxx">Youtube link</a>

EpubCheck 3.0.1 throws the following WARNING:

WARNING: 123456789.epub/OEBPS/kapitel1.xhtml(15,62): use of non-registered URI scheme type in href: https:/www.youtube.com/watch?v=xxxxxxxxxxx

But EpubCheck 4.0.1 does not!

The error message OPF_021

OPF_021=Use of non-registered URI scheme type in href: '%1$s'.

is still present, but the warning only seems to get thrown when validating DTBook data (https://github.com/IDPF/epubcheck/blob/master/src/main/java/com/adobe/epubcheck/dtbook/DTBookHandler.java#L99)

It seems the check was accidentally removed during the 4.0 refactoring?!

I expect this also to happen with EPUB 3, but haven't tested yet...

@tofi86 tofi86 added the type: bug The issue describes a bug label Sep 21, 2016
@tofi86 tofi86 added this to the Next milestone Sep 21, 2016
@tofi86
Copy link
Collaborator Author

tofi86 commented Dec 18, 2016

Was indeed removed with the B&N contribution at c74bc70

@tofi86
Copy link
Collaborator Author

tofi86 commented Dec 28, 2016

Was indeed removed with the B&N contribution at c74bc70

not true. OPF_021 was changed to HTM_025 with the B&N merge (c74bc70).

@tofi86 tofi86 changed the title Warning OPF_021 is not thrown in EpubCheck 4.0.1 but was in 3.0.1 Add enhanced URL checks in EpubCheck 4.0 Dec 28, 2016
@tofi86 tofi86 added type: improvement The issue suggests an improvement of an existing feature and removed type: bug The issue describes a bug labels Dec 28, 2016
@tofi86 tofi86 self-assigned this Dec 28, 2016
@tofi86
Copy link
Collaborator Author

tofi86 commented Dec 28, 2016

This is not a bug. The URI scheme checking has been refactored wit EpubCheck 4.0 and since the URL <a href="https:/www.youtube.com/watch?v=xxxxxxxxxxx">Youtube link</a> has a valid scheme (https) the error OPF_021 or now HTM_025 is not thrown and that's correct.

However, I suggest to add enhanced URL checks to be able to report broken URLs.

@tofi86 tofi86 changed the title Add enhanced URL checks in EpubCheck 4.0 Enhanced URL checks Dec 28, 2016
tofi86 added a commit that referenced this issue Dec 28, 2016
catches URL typos like `https:/www` or `https:www`
@tofi86 tofi86 added the status: has PR The issue is being processed in a pull request label Dec 28, 2016
tofi86 added a commit that referenced this issue Feb 2, 2017
* add new Warning(RSC-023) when host of HTTP-URL is null // fixes #708
catches URL typos with missing slashes like `https:/www` or `https:www`

* also report https URLs in the list of references
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: has PR The issue is being processed in a pull request type: improvement The issue suggests an improvement of an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant