# HG changeset patch # User Tom Fredrik Blenning # Date 1674315821 -3600 # Node ID 6b882fb6ea46934fceb76c509756aae8bc87086a # Parent ee5f98a0bc933eb3da468882b50c2b896ce55091 Do not add '/' at end if we have encoded all params. diff -r ee5f98a0bc93 -r 6b882fb6ea46 Sitemap.inc --- a/Sitemap.inc Fri Jan 13 18:08:45 2023 +0100 +++ b/Sitemap.inc Sat Jan 21 16:43:41 2023 +0100 @@ -101,7 +101,7 @@ } $optstring = genUrl($opts, array(), array('lang', 'name')); - $location = "${baseurl}${optstring}/"; + $location = "${baseurl}${optstring}"; array_push($urls, $location); } } diff -r ee5f98a0bc93 -r 6b882fb6ea46 common-functions.inc --- a/common-functions.inc Fri Jan 13 18:08:45 2023 +0100 +++ b/common-functions.inc Sat Jan 21 16:43:41 2023 +0100 @@ -127,14 +127,19 @@ $new_params[$param] = $val; } + $numEncParams=0; foreach($nonQueryParams as $nqp) { if (array_key_exists($nqp, $new_params)) { + ++$numEncParams; $val = $new_params[$nqp]; if ($val) $out .= "/${val}"; unset($new_params[$nqp]); } } + if ($numEncParams $val) { if ($val) {