allow .html or .htm in EpubParser
@@ -280,8 +280,9 @@ public class EpubParser extends AbstractParser {
for (String id : contentOrderScraper.contentItems) {
HRefMediaPair hRefMediaPair = contentOrderScraper.locationMap.get(id);
if (hRefMediaPair != null &&
- hRefMediaPair.href != null &&
- hRefMediaPair.href.toLowerCase(Locale.US).contains("html")) {
+ hRefMediaPair.href != null) {
+ String href = hRefMediaPair.href.toLowerCase(Locale.US);
+ if (href.endsWith("htm") || href.endsWith("html")) {
zae = zipFile.getEntry(relativePath + hRefMediaPair.href);
if (zae != null) {
try (InputStream is = zipFile.getInputStream(zae)) {
@@ -291,6 +292,7 @@ public class EpubParser extends AbstractParser {
}
}
}
+ }
//now handle embedded files
EmbeddedDocumentExtractor embeddedDocumentExtractor =
