Skip to content

Commit

Permalink
Update jsoup to 1.14.2 (neo4j-contrib#2243)
Browse files Browse the repository at this point in the history
  • Loading branch information
vga91 committed Feb 24, 2022
1 parent f9c30c3 commit 9a68c8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion full/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ dependencies {
compileOnly "org.apache.poi:poi-ooxml:3.17"
testImplementation "org.apache.poi:poi-ooxml:3.17"

implementation 'org.jsoup:jsoup:1.11.3'
implementation 'org.jsoup:jsoup:1.14.3'

implementation group: 'org.roaringbitmap', name: 'RoaringBitmap', version: '0.7.17'
implementation(group: 'org.apache.commons', name: 'commons-configuration2', version: '2.7') {
Expand Down
7 changes: 6 additions & 1 deletion full/src/main/java/apoc/load/LoadHtml.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ private List<Map<String, Object>> getElements(Elements elements, Map<String, Obj
private Map<String, String> getAttributes(Element element) {
Map<String, String> 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;
Expand Down

0 comments on commit 9a68c8b

Please sign in to comment.