From 1931d738c9d1c61191a8144c49cea4dca451d1a8 Mon Sep 17 00:00:00 2001 From: Romain Deltour Date: Thu, 6 Jul 2023 14:15:20 +0200 Subject: [PATCH] fix: remove undefined script-related fields from the JSON report This commit remove the following properties from the JSON report, as these were no longer set by EPUBCheck: - `scriptSrc` - `scriptTag` - `scriptInline` The report now on says if an item is scripted or not. See #1515 --- .../epubcheck/reporting/ItemMetadata.java | 24 ------------------- .../com/adobe/epubcheck/util/FeatureEnum.java | 1 - 2 files changed, 25 deletions(-) diff --git a/src/main/java/com/adobe/epubcheck/reporting/ItemMetadata.java b/src/main/java/com/adobe/epubcheck/reporting/ItemMetadata.java index ec06d6413..74e919006 100644 --- a/src/main/java/com/adobe/epubcheck/reporting/ItemMetadata.java +++ b/src/main/java/com/adobe/epubcheck/reporting/ItemMetadata.java @@ -37,12 +37,6 @@ public class ItemMetadata implements Comparable @JsonProperty private boolean isScripted; @JsonProperty - private boolean scriptSrc; - @JsonProperty - private boolean scriptTag; - @JsonProperty - private boolean scriptInline; - @JsonProperty private String renditionLayout; @JsonProperty private String renditionOrientation; @@ -167,24 +161,6 @@ public void handleInfo(FeatureEnum feature, String value) case SPINE_INDEX: this.spineIndex = Integer.parseInt(value.trim()); break; - case SCRIPT: - if (value.equals("inline")) - { - this.scriptInline = true; - } - else if (value.equals("external")) - { - this.scriptSrc = true; - } - else if (value.equals("javascript")) - { - this.scriptSrc = true; - } - else if (value.equals("tag")) - { - this.scriptTag = true; - } - break; case RENDITION_LAYOUT: this.renditionLayout = value; break; diff --git a/src/main/java/com/adobe/epubcheck/util/FeatureEnum.java b/src/main/java/com/adobe/epubcheck/util/FeatureEnum.java index 7aeee3ee6..a35e73325 100644 --- a/src/main/java/com/adobe/epubcheck/util/FeatureEnum.java +++ b/src/main/java/com/adobe/epubcheck/util/FeatureEnum.java @@ -74,7 +74,6 @@ public enum FeatureEnum RENDITION_ORIENTATION("rendition:orientation"), RENDITION_SPREAD("rendition:spread"), RESOURCE("resource"), - SCRIPT("script"), SECTIONS("sections"), SHA_256("SHA-256"), SIZE("size"),