diff --git a/lib/app_sources/html.dart b/lib/app_sources/html.dart
index 45c2048..e6e45ed 100644
--- a/lib/app_sources/html.dart
+++ b/lib/app_sources/html.dart
@@ -17,13 +17,17 @@ String ensureAbsoluteUrl(String ambiguousUrl, Uri referenceAbsoluteUrl) {
.split('/')
.where((element) => element.trim().isNotEmpty)
.toList();
+ String absoluteUrl;
if (ambiguousUrl.startsWith('/') || currPathSegments.isEmpty) {
- return '${referenceAbsoluteUrl.origin}/$ambiguousUrl';
+ absoluteUrl = '${referenceAbsoluteUrl.origin}/$ambiguousUrl';
} else if (ambiguousUrl.split('/').where((e) => e.isNotEmpty).length == 1) {
- return '${referenceAbsoluteUrl.origin}/${currPathSegments.join('/')}/$ambiguousUrl';
+ absoluteUrl =
+ '${referenceAbsoluteUrl.origin}/${currPathSegments.join('/')}/$ambiguousUrl';
} else {
- return '${referenceAbsoluteUrl.origin}/${currPathSegments.sublist(0, currPathSegments.length - (currPathSegments.last.contains('.') ? 1 : 0)).join('/')}/$ambiguousUrl';
+ absoluteUrl =
+ '${referenceAbsoluteUrl.origin}/${currPathSegments.sublist(0, currPathSegments.length - (currPathSegments.last.contains('.') ? 1 : 0)).join('/')}/$ambiguousUrl';
}
+ return Uri.parse(absoluteUrl).toString();
}
int compareAlphaNumeric(String a, String b) {
@@ -172,6 +176,8 @@ class HTML extends AppSource {
? element.text
: (element.attributes['href'] ?? '').split('/').last))
.where((element) => element.key.isNotEmpty)
+ .map((e) =>
+ MapEntry(ensureAbsoluteUrl(e.key, res.request!.url), e.value))
.toList();
if (allLinks.isEmpty) {
allLinks = RegExp(
@@ -258,7 +264,6 @@ class HTML extends AppSource {
additionalSettings['versionExtractWholePage'] == true
? res.body.split('\r\n').join('\n').split('\n').join('\\n')
: rel);
- rel = ensureAbsoluteUrl(rel, uri);
version ??= (await checkDownloadHash(rel)).toString();
return APKDetails(version, [rel].map((e) => MapEntry(e, e)).toList(),
AppNames(uri.host, tr('app')));
diff --git a/lib/main.dart b/lib/main.dart
index 23779ad..3838981 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -19,7 +19,7 @@ import 'package:easy_localization/src/easy_localization_controller.dart';
// ignore: implementation_imports
import 'package:easy_localization/src/localization.dart';
-const String currentVersion = '0.15.5';
+const String currentVersion = '0.15.6';
const String currentReleaseTag =
'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES
diff --git a/pubspec.yaml b/pubspec.yaml
index 4f0a1e9..dcf20cb 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
-version: 0.15.5+241 # When changing this, update the tag in main() accordingly
+version: 0.15.6+242 # When changing this, update the tag in main() accordingly
environment:
sdk: '>=3.0.0 <4.0.0'