Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jsoup to 1.14.2 #2243

Merged
merged 1 commit into from
Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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