From 69abc115292eb29d3a0f1f38a50a24042925726f Mon Sep 17 00:00:00 2001 From: Lars Windauer Date: Fri, 13 Sep 2024 13:01:40 +0200 Subject: [PATCH] fix: adjusted uri in link:report-issue-body --- modules/link.xqm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/link.xqm b/modules/link.xqm index d4f5a970d..0237d1bc7 100755 --- a/modules/link.xqm +++ b/modules/link.xqm @@ -110,10 +110,10 @@ declare function link:email($email as xs:string, $subject as xs:string?, $body a declare function link:report-issue-body($node, $model) as xs:string { let $error as xs:string? := (templates:process(
, $model)/string(.))[1][normalize-space(.) ne '']
-    let $url := (
-        $model?url,
-        try { request:get-url() }
-            catch err:XPDY0002 { 'test-url' }  (: some contexts do not have a request object, e.g. xqsuite testing :)
+    let $uri := "https://history.state.gov" || (
+        $model?uri,
+        try { substring-after(request:get-uri(), $app:APP_ROOT)}
+            catch err:XPDY0002 { 'test-path' }  (: some contexts do not have a request object, e.g. xqsuite testing :)
     )[1]
     let $tab := codepoints-to-string(9)
     let $parameters as xs:string* :=
@@ -129,7 +129,7 @@ declare function link:report-issue-body($node, $model) as xs:string {
         "Please provide any additional information above this line",
         "",
         "Requested URL:",
-        $tab || $url,
+        $tab || $uri,
         ""[exists($parameters)],
         "Parameters:"[exists($parameters)],
         $parameters,