mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-13 13:26:43 +02:00
HTML link parsing bugfix (#1259)
This commit is contained in:
@ -19,6 +19,8 @@ String ensureAbsoluteUrl(String ambiguousUrl, Uri referenceAbsoluteUrl) {
|
||||
.toList();
|
||||
String absoluteUrl;
|
||||
if (ambiguousUrl.startsWith('/') || currPathSegments.isEmpty) {
|
||||
absoluteUrl = '${referenceAbsoluteUrl.origin}$ambiguousUrl';
|
||||
} else if (currPathSegments.isEmpty) {
|
||||
absoluteUrl = '${referenceAbsoluteUrl.origin}/$ambiguousUrl';
|
||||
} else if (ambiguousUrl.split('/').where((e) => e.isNotEmpty).length == 1) {
|
||||
absoluteUrl =
|
||||
|
Reference in New Issue
Block a user