diff --git a/full/build.gradle b/full/build.gradle index e4a579be60..20f6606eee 100644 --- a/full/build.gradle +++ b/full/build.gradle @@ -64,7 +64,7 @@ dependencies { compileOnly "org.apache.poi:poi-ooxml:3.17" testCompile "org.apache.poi:poi-ooxml:3.17" - compile 'org.jsoup:jsoup:1.11.3' + compile 'org.jsoup:jsoup:1.14.3' compile group: 'org.roaringbitmap', name: 'RoaringBitmap', version: '0.7.17' compile(group: 'org.apache.commons', name: 'commons-configuration2', version: '2.7') { diff --git a/full/src/main/java/apoc/load/LoadHtml.java b/full/src/main/java/apoc/load/LoadHtml.java index 8ffaaf1925..8a435489fc 100644 --- a/full/src/main/java/apoc/load/LoadHtml.java +++ b/full/src/main/java/apoc/load/LoadHtml.java @@ -115,7 +115,12 @@ private List> getElements(Elements elements, Map getAttributes(Element element) { Map attributes = new HashMap<>(); for (Attribute attribute : element.attributes()) { - if(!attribute.getValue().isEmpty()) attributes.put(attribute.getKey(), attribute.getValue()); + if (!attribute.hasDeclaredValue() && !Attribute.isBooleanAttribute(attribute.getKey())) { + throw new RuntimeException("Invalid tag " + element); + } + if (!attribute.getValue().isBlank()) { + attributes.put(attribute.getKey(), attribute.getValue()); + } } return attributes;