From fe12aa349bcded659df3aad24a550164e8647b1c Mon Sep 17 00:00:00 2001 From: MarkvanMents Date: Mon, 28 Sep 2026 17:45:52 +0200 Subject: [PATCH 1/2] Fix Unicode white space text being uploaded to Algolia --- layouts/_default/list.mxdocsalgolia.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/_default/list.mxdocsalgolia.json b/layouts/_default/list.mxdocsalgolia.json index 5b0e0d6284d..e2cc3416e85 100644 --- a/layouts/_default/list.mxdocsalgolia.json +++ b/layouts/_default/list.mxdocsalgolia.json @@ -121,7 +121,8 @@ Define Global variables {{- $scratch.SetInMap $uniqueHit "h6" $h6 -}} {{- $uniqueHierarchy = printf "%s > %s" $uniqueHierarchy $h6 -}} {{- end -}} - {{- $text = trim (htmlUnescape ($processSlice | plainify)) " " -}} + {{- /* strings.TrimSpace strips all Unicode whitespace including \r, \n, \t, and non-breaking spaces ( ) that trim " " misses */ -}} + {{- $text = strings.TrimSpace (htmlUnescape ($processSlice | plainify)) -}} {{- $scratch.SetInMap $uniqueHit "text" $text -}} {{- $scratch.SetInMap $uniqueHit "mendix_version" $pageDot.Params.mendix_version -}} {{- $scratch.SetInMap $uniqueHit "time_stamp" $pageDot.Lastmod.UTC.Unix -}} From 5aefbd87521ba302a9f1abc504104a33ed5f9930 Mon Sep 17 00:00:00 2001 From: MarkvanMents Date: Mon, 28 Sep 2026 17:47:18 +0200 Subject: [PATCH 2/2] Fix whitespace in heading fields uploaded to Algolia After plainify strips HTML tags from heading elements, trailing \r, \n, and other whitespace remained in the h2-h6 fields because htmlUnescape alone does not trim. This caused dirty values in those fields and in the unique_hierarchy breadcrumb string. Replaced htmlUnescape with strings.TrimSpace (htmlUnescape ...) for all five heading levels. Co-Authored-By: Claude Sonnet 4.6 --- layouts/_default/list.mxdocsalgolia.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/layouts/_default/list.mxdocsalgolia.json b/layouts/_default/list.mxdocsalgolia.json index e2cc3416e85..5637f341c96 100644 --- a/layouts/_default/list.mxdocsalgolia.json +++ b/layouts/_default/list.mxdocsalgolia.json @@ -70,25 +70,25 @@ Define Global variables {{- $startSlice = slicestr $processSlice 0 3 -}} {{- /* Set up the heading level we are in */ -}} {{- if eq $startSlice "