From 6ccb65ccb7cf33e8714f36329bef81a69a92d910 Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Tue, 8 Sep 2026 16:21:50 +0200 Subject: [PATCH 1/4] Document default parameters of removeQueryParams --- content/terms/how-to/apply-filters.md | 4 +++- content/terms/reference/built-in-filters.md | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/content/terms/how-to/apply-filters.md b/content/terms/how-to/apply-filters.md index b250e8a6..62ad0f2a 100644 --- a/content/terms/how-to/apply-filters.md +++ b/content/terms/how-to/apply-filters.md @@ -109,9 +109,11 @@ For filters that don’t require parameters, add the filter name as a string: } ``` +Built-in filters declared this way use their default parameters. For example, `removeQueryParams` alone removes the well-known tracking parameters listed in its [reference]({{< relref "terms/reference/built-in-filters/#ref-removequeryparams" >}}). + ### Filter with parameters -For filters that take parameters, use an object format, for example with the built-in filter `removeQueryParams` to remove query parameters from URLs: +For filters that take parameters, use an object format, for example with the built-in filter `removeQueryParams` to choose which query parameters to remove from URLs: ```json { diff --git a/content/terms/reference/built-in-filters.md b/content/terms/reference/built-in-filters.md index c3075330..d4e31b00 100644 --- a/content/terms/reference/built-in-filters.md +++ b/content/terms/reference/built-in-filters.md @@ -8,9 +8,24 @@ This reference details all available built-in [filters]({{< relref "terms/explan {{< refItem name="removeQueryParams" - description="Removes specified query parameters from URLs in links and images." + description="Removes query parameters from URLs in links and images. Without parameters, removes well-known tracking parameters such as `utm_source` or `fbclid`, listed in the [engine source code](https://github.com/OpenTermsArchive/engine/blob/main/src/archivist/extract/exposedFilters.js). Declaring parameters replaces this default list." >}} +With the default parameters: + +```json +"filter": [ + "removeQueryParams" +] +``` + +```diff +-

Read the list of our affiliates.

++

Read the list of our affiliates.

+``` + +With explicit parameters: + ```json "filter": [ { From e470631c80e9950fc5bad92398160655d8ef4c9b Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Tue, 8 Sep 2026 16:21:50 +0200 Subject: [PATCH 2/4] Mention filter defaults in the apply filters guide --- content/terms/how-to/apply-filters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/terms/how-to/apply-filters.md b/content/terms/how-to/apply-filters.md index 62ad0f2a..390e74a8 100644 --- a/content/terms/how-to/apply-filters.md +++ b/content/terms/how-to/apply-filters.md @@ -109,7 +109,7 @@ For filters that don’t require parameters, add the filter name as a string: } ``` -Built-in filters declared this way use their default parameters. For example, `removeQueryParams` alone removes the well-known tracking parameters listed in its [reference]({{< relref "terms/reference/built-in-filters/#ref-removequeryparams" >}}). +Built-in filters declared this way use their default parameters. For example, `removeQueryParams` alone removes the well-known tracking parameters described in its [reference]({{< relref "terms/reference/built-in-filters/#ref-removequeryparams" >}}). ### Filter with parameters From d8dde114e0e3311e07d2e7c7053cbb43755b7a1d Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Tue, 8 Sep 2026 16:21:50 +0200 Subject: [PATCH 3/4] Document convertSpacesToStandard built-in filter --- content/terms/reference/built-in-filters.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/content/terms/reference/built-in-filters.md b/content/terms/reference/built-in-filters.md index d4e31b00..51eecb31 100644 --- a/content/terms/reference/built-in-filters.md +++ b/content/terms/reference/built-in-filters.md @@ -40,3 +40,21 @@ With explicit parameters: ``` {{< /refItem >}} + +{{< refItem + name="convertSpacesToStandard" + description="Replaces Unicode space separators, such as non-breaking spaces or narrow no-break spaces, with a regular space in text content." +>}} + +```json +"filter": [ + "convertSpacesToStandard" +] +``` + +```diff +-

Read the list of our affiliates.

++

Read the list of our affiliates.

+``` + +{{< /refItem >}} From dd98c124b564494328119bb9570e049910df0fbe Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Wed, 9 Sep 2026 10:41:17 +0200 Subject: [PATCH 4/4] Document how to extend the default parameters --- content/terms/reference/built-in-filters.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/content/terms/reference/built-in-filters.md b/content/terms/reference/built-in-filters.md index 51eecb31..8bcf9952 100644 --- a/content/terms/reference/built-in-filters.md +++ b/content/terms/reference/built-in-filters.md @@ -39,6 +39,22 @@ With explicit parameters: +

Read the list of our affiliates.

``` +To keep the default parameters and remove additional ones, declare the filter twice, as filters are applied in order: + +```json +"filter": [ + "removeQueryParams", + { + "removeQueryParams": ["ref"] + } +] +``` + +```diff +-

Read the list of our affiliates.

++

Read the list of our affiliates.

+``` + {{< /refItem >}} {{< refItem