HTML bugfix: Incorrect URL resolution on redirected pages (#2315)

This commit is contained in:
Imran Remtulla
2025-06-13 16:49:59 -04:00
parent b539f0a926
commit 5f971dcddb
3 changed files with 15 additions and 8 deletions

View File

@@ -9,6 +9,13 @@ import 'package:obtainium/providers/apps_provider.dart';
import 'package:obtainium/providers/source_provider.dart';
String ensureAbsoluteUrl(String ambiguousUrl, Uri referenceAbsoluteUrl) {
try {
if (Uri.parse(ambiguousUrl).isAbsolute) {
return ambiguousUrl; // #2315
}
} catch (e) {
//
}
return referenceAbsoluteUrl.resolve(ambiguousUrl).toString();
}