Skip to content

Commit babf86e

Browse files
authored
Merge pull request #239 from adamretter/improve-filter
Improve filter for q=xsl
2 parents d0d8373 + 27017db commit babf86e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main/xar-resources/modules/search.xql

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,13 @@ function dq:match-to-copy($element as element()) as element() {
175175
declare
176176
%private
177177
function dq:to-uri-query($search-params as map(xs:string, xs:string)) as xs:string {
178-
let $string :=
179178
string-join(
180-
map:for-each($search-params, function($k, $v) { $k || "=" || $v }),
179+
map:for-each($search-params, function($k, $v) {
180+
if ($k eq "q" and $v eq "xsl") then
181+
()
182+
else
183+
$k || "=" || $v
184+
}),
181185
"&"
182-
)
183-
return
184-
substring-after($string, 'q=xsl&')
186+
)
185187
};

0 commit comments

Comments
 (0)