forked from Qortal/qortal
Repalce & with & in HTML documents.
This is not a long term solution, but it's a quick fix to solve URL problems when converting to a static site via httrack.
This commit is contained in:
parent
fe387931a4
commit
7a77b12834
@ -78,11 +78,17 @@ public class HTMLParser {
|
||||
}
|
||||
}
|
||||
}
|
||||
return document.html().getBytes();
|
||||
String html = document.html();
|
||||
html = this.replaceAmpersands(html);
|
||||
return html.getBytes();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
private String replaceAmpersands(String html) {
|
||||
return html.replace("&", "&");
|
||||
}
|
||||
|
||||
private boolean shouldReplaceLink(String elementHtml) {
|
||||
List<String> prefixes = new ArrayList<>();
|
||||
prefixes.add("http"); // Don't modify absolute links
|
||||
|
Loading…
x
Reference in New Issue
Block a user