Skip to content

Commit

Permalink
Update jsoup to 1.14.2
Browse files Browse the repository at this point in the history
  • Loading branch information
conker84 authored and JMHReif committed Nov 8, 2021
1 parent 614dda7 commit e686ea1
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"
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') {
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 e686ea1

Please sign in to comment.