From fd22113e44e9c5f99fb8c8bca9386079e78e1b27 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Mon, 8 Jan 2024 18:18:57 -0500 Subject: [PATCH] HTML link parsing bugfix (#1259) --- lib/app_sources/html.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/app_sources/html.dart b/lib/app_sources/html.dart index e6e45ed..cd48bbc 100644 --- a/lib/app_sources/html.dart +++ b/lib/app_sources/html.dart @@ -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 =