Skip to content

Commit

Permalink
Merge pull request #462 from HistoryAtState/fix/report-an-issue
Browse files Browse the repository at this point in the history
fix: adjusted uri in link:report-issue-body
  • Loading branch information
joewiz committed Sep 13, 2024
2 parents 9596af2 + 69abc11 commit 8721052
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/link.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -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(<pre class="error app:error-description"/>, $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* :=
Expand All @@ -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,
Expand Down

0 comments on commit 8721052

Please sign in to comment.