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

Error in ePubCheck 4.2.4 with INFO(HTM_053) #1182

Closed
JackieFei opened this issue Sep 2, 2020 · 1 comment · Fixed by #1207
Closed

Error in ePubCheck 4.2.4 with INFO(HTM_053) #1182

JackieFei opened this issue Sep 2, 2020 · 1 comment · Fixed by #1207
Assignees
Labels
status: has PR The issue is being processed in a pull request type: false-positive This issue is about valid content being incorrectly rejected
Milestone

Comments

@JackieFei
Copy link

Hi,

the epub sample (pls rename the .zip to .epub) :
epubcheck_mistake.zip

Section0001.xhtml

<body>
  <p>Line 1 : INFO(HTM_053): Found an external file link (file://) in file: '<a href="file:///C:/Use">anchor</a>'</p>
  <p>Line 2 : INFO(HTM_053): Found an external file link (file://) in file: '&lt;a href="file:///C:/Use"&gt;anchor&lt;a&gt;'</p>
</body>

Note :

  1. Line 1 is a real link
  2. Line 2 is a pure text

This image is Section0001.xhtml shown in reading system :
截圖 2020-09-02 下午3 20 19

epubcheck-4.2.4 output :

INFO(HTM_053): epubcheck_mistake.epub/OEBPS/Text/Section0001.xhtml(10,80): ...... [this is Line 1]
INFO(HTM_053): epubcheck_mistake.epub/OEBPS/Text/Section0001.xhtml(11,83): ...... [this is Line 2]

We think the Line 2 INFO(HTM_053) is a mistake.

@rdeltour rdeltour self-assigned this Sep 2, 2020
@rdeltour rdeltour added status: accepted Ready to be further processed type: false-positive This issue is about valid content being incorrectly rejected labels Sep 2, 2020
@rdeltour rdeltour added this to the v4.2.5 milestone Sep 2, 2020
@rdeltour
Copy link
Member

rdeltour commented Sep 2, 2020

Thanks for the report @JackieFei!
I could reproduce and it definitely seems that the second one should not be reported 😊

Tentatively adding this issue to the next milestone. I'm labelling this as a false-positive, but it's only an INFO message, so not as critical as other false positives.

rdeltour added a commit that referenced this issue Feb 26, 2021
Fix the regex used to report "file:" hyperlinks as `HTM-053` (informative)
to only consider HTML elements and not plain text.

This regex-based parsing is still brittle, but we'll refactor this whole
package later. For now this simple fix will do.

Fixes #1182
@rdeltour rdeltour added status: has PR The issue is being processed in a pull request and removed status: accepted Ready to be further processed labels Feb 26, 2021
rdeltour added a commit that referenced this issue Feb 26, 2021
Fix the regex used to report "file:" hyperlinks as `HTM-053` (informative)
to only consider HTML elements and not plain text.

This regex-based parsing is still brittle, but we'll refactor this whole
package later. For now this simple fix will do.

Fixes #1182
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: false-positive This issue is about valid content being incorrectly rejected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants