epubcheck icon indicating copy to clipboard operation
epubcheck copied to clipboard

Parsing error in class attributes doesn't report the line number

Open rdeltour opened this issue 10 years ago • 2 comments

Reported by Keith Snyder on Twitter, e.g. due to a missing end quote:

<p class="x>blah blah</p>

the error will be "Error while parsing file: the value of attribute class etc."

This is likely reported by Jing, see why the line number is not reported and if it can be fixed.

rdeltour avatar Dec 09 '15 18:12 rdeltour

Clearing assignee and removing from 4.1.0 milestone. Feel free to work on it and assign it back to 4.1.0 as long as we're still working on it.

tofi86 avatar Sep 26 '17 22:09 tofi86

Tested using this EPUB.

With versions 4.0.1 through 4.2.6 I get two errors:

Validating using EPUB version 3.0.1 rules.
FATAL(RSC-016): missing_quote.epub/OEBPS/1.xhtml(10,26): Fatal Error while parsing file 'The value of attribute "class" associated with an element type "p" must not contain the '<' character.'.
ERROR(RSC-005): missing_quote.epub/OEBPS/1.xhtml(-1,-1): Error while parsing file 'The value of attribute "class" associated with an element type "p" must not contain the '<' character.'.

Check finished with errors

epubcheck completed

The first error (RSC-016) correctly reports the line number, but the second one (RSC-005) has unknown location. If this issue is regarding the second error then it might explain it.

From 5.0.0 onward I only get one error:

Validating using EPUB version 3.3 rules.
FATAL(RSC-016): missing_quote.epub/OEBPS/1.xhtml(10,26): Fatal Error while parsing file: The value of attribute "class" associated with an element type "p" must not contain the '<' character.

Check finished with errors
Messages: 1 fatal / 0 errors / 0 warnings / 0 infos

EPUBCheck completed

So not sure if this issue is still relevant.

naglis avatar Jul 19 '24 05:07 naglis