mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-19 05:00:21 +02:00
HTML bugfix: Incorrect URL resolution on redirected pages (#2315)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user