Commit b189a485 authored by Mathias Goebel's avatar Mathias Goebel 🎠

Merge branch 'bugfix/uri-encoding-#61' into 'develop'

Escape textgrid URI (closes #61)

Closes #61

See merge request !52
parents d6968a6f 8a0a5706
......@@ -35,6 +35,7 @@ return
declare function tgmenu:list($uris as xs:string*, $metacollection, $aggcollection) as element( ul ) {
<ul class="nav-textgrid">
{for $uri in $uris
let $escaped-uri := $uri => xmldb:encode-uri() => xs:string()
let $meta := $metacollection//tgmd:object[tgmd:generic/tgmd:generated/tgmd:textgridUri = $uri]
let $title := $meta//tgmd:title/string()
let $format := $meta//tgmd:format/string()
......@@ -44,12 +45,12 @@ declare function tgmenu:list($uris as xs:string*, $metacollection, $aggcollectio
if($format = "text/xml")
then
(element a {
attribute href {"./"||$uri},
attribute href {"./" || $escaped-uri},
$title
},
"&#160;",
element a {
attribute href {"./raw.html?id="||$uri},
attribute href {"./raw.html?id="||$escaped-uri},
<i class="fas fa-file-code" aria-hidden="true"></i>
})
else $title}{
......
......@@ -23,7 +23,8 @@
</li>
<li class="bugs">Bugfixes
<ul>
<li>test for invalid fork names (e.g. 'develop' and all present targets)</li>
<li>Test for invalid fork names (e.g. 'develop' and all present targets)</li>
<li>Escape ':' in links containing a TextGrid URI</li>
</ul>
</li>
</ul>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment