diff --git a/layouts/shortcodes/multifilter-search.html b/layouts/shortcodes/multifilter-search.html index 2e77321cfa300..97fad981457ec 100644 --- a/layouts/shortcodes/multifilter-search.html +++ b/layouts/shortcodes/multifilter-search.html @@ -185,15 +185,18 @@ {{ $table.Set "filter_info" "" }} {{ $table.Set "search_info" "" }} {{ range $k, $v := ($table.Get "filter_keys") }} - {{ $table.Add "filter_info" (printf (cond (not $k) "%s" ",%s") (index $row $v)) }} + {{/* Removes markdown link syntax if it exists */}} + {{ $clean_value := replaceRE `\[(.*)\]\(.*\)` "$1" (index $row $v) }} + {{ $table.Add "filter_info" (printf (cond (not $k) "%s" ",%s") $clean_value) }} {{ end }} {{ range $table.Get "search_keys" }} - {{ $table.Add "search_info" (printf ";%s" (index $row (.|lower))) }} + {{/* Removes markdown link syntax if it exists */}} + {{ $clean_value := replaceRE `\[(.*)\]\(.*\)` "$1" (index $row (.|lower)) }} + {{ $table.Add "search_info" (printf ";%s" $clean_value) }} {{ end }} {{ $all_info := print ($table.Get "filter_info") ($table.Get "search_info") }} - {{ range (index ($navigation.Get "dropdown") $h.name) | sort }} - {{ $id := (printf "%s-%s" . $filter_type) | anchorize }} + {{/* Removes markdown link syntax if it exists */}} + {{ $clean_value := replaceRE `\[(.*)\]\(.*\)` "$1" . }} + {{ $id := (printf "%s-%s" $clean_value $filter_type) | anchorize }}
{{ end }}