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