Fix spaces in URIs

This commit is contained in:
M66B 2021-10-07 10:29:51 +02:00
parent eb915d20b4
commit 4c140a92e3
1 changed files with 6 additions and 0 deletions

View File

@ -1262,6 +1262,12 @@ public class HtmlHelper {
String base = (b.size() > 0 ? b.get(0).attr("href") : null);
for (Element a : document.select("a")) {
String href = a.attr("href");
if (href.contains(" ")) {
href = href.replace(" ", "%20");
a.attr("href", href);
}
if (!TextUtils.isEmpty(base))
try {
// https://developer.android.com/reference/java/net/URI