From 1116c238cf30288393cb02f2e9b158e382a5069e Mon Sep 17 00:00:00 2001 From: Sarah Date: Wed, 13 Aug 2025 15:02:56 +0200 Subject: [PATCH] 491: update validate input extension for searching words with accents + make ckeditor + plain text fields searchable --- ...-d86336d6-7efa-44f9-9a10-8619c79beeca.yaml | 45 +++++-------------- ...-1ea43556-c1c6-4ae7-9c49-48498a82f797.yaml | 9 +++- ...-bbb6f7a2-b1e0-45d0-8a0d-805501952c5f.yaml | 6 ++- ...-66954acb-77ba-4c75-9659-f3976770df07.yaml | 9 +++- ...-5d7250f9-a00c-4732-a743-b46bb5d11646.yaml | 9 +++- ...-b4e0e49a-bcd4-4d67-80ad-09ea0d807bd8.yaml | 9 +++- ...-56d715d0-6a9d-4562-9c66-e5b4caad7f44.yaml | 37 +++++++++++++++ ...-c09b8e44-9631-46c1-85d0-53b43a35c2c6.yaml | 2 +- ...-8be24311-d95b-441d-aeed-00461fcc4cc4.yaml | 2 +- config/project/project.yaml | 2 +- .../src/web/twig/ValidateInputExtension.php | 2 +- 11 files changed, 85 insertions(+), 47 deletions(-) diff --git a/config/project/entryTypes/textImage--d86336d6-7efa-44f9-9a10-8619c79beeca.yaml b/config/project/entryTypes/textImage--d86336d6-7efa-44f9-9a10-8619c79beeca.yaml index af509ea1..58098bc0 100644 --- a/config/project/entryTypes/textImage--d86336d6-7efa-44f9-9a10-8619c79beeca.yaml +++ b/config/project/entryTypes/textImage--d86336d6-7efa-44f9-9a10-8619c79beeca.yaml @@ -1,42 +1,15 @@ color: blue +description: null fieldLayouts: f4023492-353e-4a86-9695-455793644dc4: + cardThumbAlignment: end tabs: - elementCondition: null elements: - - - autocapitalize: true - autocomplete: false - autocorrect: true - class: null - dateAdded: '2024-09-17T12:37:53+00:00' - disabled: false - elementCondition: null - id: null - includeInCards: false - inputType: null - instructions: null - label: null - max: null - min: null - name: null - orientation: null - placeholder: null - providesThumbs: false - readonly: false - requirable: false - size: null - step: null - tip: null - title: null - type: craft\fieldlayoutelements\entries\EntryTitleField - uid: 69e397e5-732d-4e21-8924-bc5b3943f7dc - userCondition: null - warning: null - width: 100 - dateAdded: '2024-09-17T12:37:53+00:00' + editCondition: null elementCondition: null fieldUid: 838aabf9-a30e-4616-ad7c-b89fe15d7cae # Title (Anchor) handle: null @@ -53,6 +26,7 @@ fieldLayouts: width: 100 - dateAdded: '2024-09-17T12:44:56+00:00' + editCondition: null elementCondition: null fieldUid: 1ea43556-c1c6-4ae7-9c49-48498a82f797 # CK Editor - Extended handle: text @@ -69,6 +43,7 @@ fieldLayouts: width: 100 - dateAdded: '2024-09-17T12:37:53+00:00' + editCondition: null elementCondition: null fieldUid: 71d59fcf-f766-4db1-a6fe-87bf1ce1b1ba # Call to action handle: null @@ -85,6 +60,7 @@ fieldLayouts: width: 100 - dateAdded: '2024-09-17T12:37:53+00:00' + editCondition: null elementCondition: null fieldUid: a44287f8-d6ed-4f2c-8a63-0c1312ef236e # Image handle: null @@ -101,12 +77,12 @@ fieldLayouts: width: 100 - dateAdded: '2024-09-17T12:37:53+00:00' + editCondition: null elementCondition: class: craft\elements\conditions\entries\EntryCondition conditionRules: - class: craft\fields\conditions\RelationalFieldConditionRule - elementId: null fieldUid: a44287f8-d6ed-4f2c-8a63-0c1312ef236e # Image layoutElementUid: f15e1db3-4e58-4ab3-81b3-b6f1b2d5bb74 operator: notempty @@ -128,6 +104,7 @@ fieldLayouts: width: 100 - dateAdded: '2024-09-17T12:37:53+00:00' + editCondition: null elementCondition: null fieldUid: 3857f4aa-a319-44ec-8b5e-d907d3d1bf31 # Background Color handle: null @@ -151,8 +128,8 @@ icon: text name: 'Text (+ Image)' showSlugField: true showStatusField: true -slugTranslationKeyFormat: '' +slugTranslationKeyFormat: null slugTranslationMethod: site -titleFormat: '' -titleTranslationKeyFormat: '' +titleFormat: null +titleTranslationKeyFormat: null titleTranslationMethod: site diff --git a/config/project/fields/ckEditorExtended--1ea43556-c1c6-4ae7-9c49-48498a82f797.yaml b/config/project/fields/ckEditorExtended--1ea43556-c1c6-4ae7-9c49-48498a82f797.yaml index 3180d3ee..422130d0 100644 --- a/config/project/fields/ckEditorExtended--1ea43556-c1c6-4ae7-9c49-48498a82f797.yaml +++ b/config/project/fields/ckEditorExtended--1ea43556-c1c6-4ae7-9c49-48498a82f797.yaml @@ -2,19 +2,24 @@ columnSuffix: null handle: ckEditorExtended instructions: null name: 'CK Editor - Extended' -searchable: false +searchable: true settings: availableTransforms: '' availableVolumes: '*' + characterLimit: null ckeConfig: 25f93ead-d3f6-4049-ba98-6378754f4289 # Extended createButtonLabel: null defaultTransform: null - enableSourceEditingForNonAdmins: false + expandEntryButtons: false + fullGraphqlData: false + parseEmbeds: false purifierConfig: null purifyHtml: true showUnpermittedFiles: false showUnpermittedVolumes: false showWordCount: false + sourceEditingGroups: + - __ADMINS__ wordLimit: null translationKeyFormat: null translationMethod: site diff --git a/config/project/fields/ckEditorExtendedWithoutH3--bbb6f7a2-b1e0-45d0-8a0d-805501952c5f.yaml b/config/project/fields/ckEditorExtendedWithoutH3--bbb6f7a2-b1e0-45d0-8a0d-805501952c5f.yaml index 5b780b60..b5ecaac2 100644 --- a/config/project/fields/ckEditorExtendedWithoutH3--bbb6f7a2-b1e0-45d0-8a0d-805501952c5f.yaml +++ b/config/project/fields/ckEditorExtendedWithoutH3--bbb6f7a2-b1e0-45d0-8a0d-805501952c5f.yaml @@ -2,13 +2,17 @@ columnSuffix: null handle: ckEditorExtendedWithoutH3 instructions: null name: 'CK Editor - Extended without H3' -searchable: false +searchable: true settings: availableTransforms: '' availableVolumes: '*' + characterLimit: null ckeConfig: ea302929-bdb1-4267-a95e-4412305a068e # Extended without H3 createButtonLabel: null defaultTransform: null + expandEntryButtons: false + fullGraphqlData: false + parseEmbeds: false purifierConfig: null purifyHtml: true showUnpermittedFiles: false diff --git a/config/project/fields/ckEditorSimple--66954acb-77ba-4c75-9659-f3976770df07.yaml b/config/project/fields/ckEditorSimple--66954acb-77ba-4c75-9659-f3976770df07.yaml index d5a4d74c..afbb0929 100644 --- a/config/project/fields/ckEditorSimple--66954acb-77ba-4c75-9659-f3976770df07.yaml +++ b/config/project/fields/ckEditorSimple--66954acb-77ba-4c75-9659-f3976770df07.yaml @@ -2,19 +2,24 @@ columnSuffix: null handle: ckEditorSimple instructions: null name: 'CK Editor - Simple' -searchable: false +searchable: true settings: availableTransforms: '' availableVolumes: '*' + characterLimit: null ckeConfig: 131a4f6d-f00f-4238-b846-dd504bf669fe # Simple createButtonLabel: null defaultTransform: null - enableSourceEditingForNonAdmins: false + expandEntryButtons: false + fullGraphqlData: false + parseEmbeds: false purifierConfig: null purifyHtml: true showUnpermittedFiles: false showUnpermittedVolumes: false showWordCount: false + sourceEditingGroups: + - __ADMINS__ wordLimit: null translationKeyFormat: null translationMethod: site diff --git a/config/project/fields/ckEditorStandard--5d7250f9-a00c-4732-a743-b46bb5d11646.yaml b/config/project/fields/ckEditorStandard--5d7250f9-a00c-4732-a743-b46bb5d11646.yaml index 36eaa043..c7703f0d 100644 --- a/config/project/fields/ckEditorStandard--5d7250f9-a00c-4732-a743-b46bb5d11646.yaml +++ b/config/project/fields/ckEditorStandard--5d7250f9-a00c-4732-a743-b46bb5d11646.yaml @@ -2,19 +2,24 @@ columnSuffix: null handle: ckEditorStandard instructions: null name: 'CK Editor - Standard' -searchable: false +searchable: true settings: availableTransforms: '' availableVolumes: '*' + characterLimit: null ckeConfig: 7d23b02c-ad1d-44a8-9751-35fbdcc38963 # Standard createButtonLabel: null defaultTransform: null - enableSourceEditingForNonAdmins: false + expandEntryButtons: false + fullGraphqlData: false + parseEmbeds: false purifierConfig: null purifyHtml: true showUnpermittedFiles: false showUnpermittedVolumes: false showWordCount: false + sourceEditingGroups: + - __ADMINS__ wordLimit: null translationKeyFormat: null translationMethod: site diff --git a/config/project/fields/ckEditorTable--b4e0e49a-bcd4-4d67-80ad-09ea0d807bd8.yaml b/config/project/fields/ckEditorTable--b4e0e49a-bcd4-4d67-80ad-09ea0d807bd8.yaml index dfb5b8b9..7aad5071 100644 --- a/config/project/fields/ckEditorTable--b4e0e49a-bcd4-4d67-80ad-09ea0d807bd8.yaml +++ b/config/project/fields/ckEditorTable--b4e0e49a-bcd4-4d67-80ad-09ea0d807bd8.yaml @@ -2,19 +2,24 @@ columnSuffix: null handle: ckEditorTable instructions: null name: 'CK Editor - Table' -searchable: false +searchable: true settings: availableTransforms: '' availableVolumes: '*' + characterLimit: null ckeConfig: 5dbe5a67-b60b-4529-a095-facb9b24a39b # Table createButtonLabel: null defaultTransform: null - enableSourceEditingForNonAdmins: false + expandEntryButtons: false + fullGraphqlData: false + parseEmbeds: false purifierConfig: null purifyHtml: true showUnpermittedFiles: false showUnpermittedVolumes: false showWordCount: false + sourceEditingGroups: + - __ADMINS__ wordLimit: null translationKeyFormat: null translationMethod: site diff --git a/config/project/fields/contentBuilder--56d715d0-6a9d-4562-9c66-e5b4caad7f44.yaml b/config/project/fields/contentBuilder--56d715d0-6a9d-4562-9c66-e5b4caad7f44.yaml index a9d887b8..8294d92d 100644 --- a/config/project/fields/contentBuilder--56d715d0-6a9d-4562-9c66-e5b4caad7f44.yaml +++ b/config/project/fields/contentBuilder--56d715d0-6a9d-4562-9c66-e5b4caad7f44.yaml @@ -6,67 +6,104 @@ searchable: true settings: createButtonLabel: null defaultIndexViewMode: cards + enableVersioning: false entryTypes: - __assoc__: - - uid - d86336d6-7efa-44f9-9a10-8619c79beeca # Text (+ Image) + - + - group + - General - __assoc__: - - uid - 1e4267e1-8d5f-4312-8458-86b19bc17d74 # Text (2 columns) + - + - group + - General - __assoc__: - - uid - 7b5ab248-6255-4b42-88bc-80c1dee62b20 # Call To Action + - + - group + - General - __assoc__: - - uid - 24bd0074-b53d-404d-9285-a0be9f26bbd4 # Overview + - + - group + - General - __assoc__: - - uid - 0396f80c-a192-4beb-a6e7-075075cf0f70 # Image + - + - group + - General - __assoc__: - - uid - 7256a782-20ff-4771-9d85-ed3f49e13ef4 # Quote + - + - group + - General - __assoc__: - - uid - 209777db-293c-48b6-9897-1fe97b278510 # Video + - + - group + - General - __assoc__: - - uid - 95920915-f806-4fbc-9c22-979ec9085fe8 # Text + Video + - + - group + - General - __assoc__: - - uid - f2d33237-c7de-4590-9683-7efe6594ebbd # Custom Table + - + - group + - General - __assoc__: - - uid - f3211a4e-d5f8-4514-a372-c5b8cfc2c44a # Form + - + - group + - General - __assoc__: - - uid - 74b929e4-c99f-4da0-80c7-16d8434d09f6 # FAQ + - + - group + - General - __assoc__: - - uid - 4cfdbd85-009b-4c7f-a53c-1a4650483498 # Embed + - + - group + - General includeTableView: false maxEntries: null minEntries: null diff --git a/config/project/fields/plainTextNotTranslatable--c09b8e44-9631-46c1-85d0-53b43a35c2c6.yaml b/config/project/fields/plainTextNotTranslatable--c09b8e44-9631-46c1-85d0-53b43a35c2c6.yaml index 3a3f6320..deefd0f1 100644 --- a/config/project/fields/plainTextNotTranslatable--c09b8e44-9631-46c1-85d0-53b43a35c2c6.yaml +++ b/config/project/fields/plainTextNotTranslatable--c09b8e44-9631-46c1-85d0-53b43a35c2c6.yaml @@ -2,7 +2,7 @@ columnSuffix: null handle: plainTextNotTranslatable instructions: null name: 'Plain Text (Not Translatable)' -searchable: false +searchable: true settings: byteLimit: null charLimit: null diff --git a/config/project/fields/plainTextTranslatable--8be24311-d95b-441d-aeed-00461fcc4cc4.yaml b/config/project/fields/plainTextTranslatable--8be24311-d95b-441d-aeed-00461fcc4cc4.yaml index abf1158f..36b18be1 100644 --- a/config/project/fields/plainTextTranslatable--8be24311-d95b-441d-aeed-00461fcc4cc4.yaml +++ b/config/project/fields/plainTextTranslatable--8be24311-d95b-441d-aeed-00461fcc4cc4.yaml @@ -2,7 +2,7 @@ columnSuffix: null handle: plainTextTranslatable instructions: null name: 'Plain Text (Translatable)' -searchable: false +searchable: true settings: byteLimit: null charLimit: null diff --git a/config/project/project.yaml b/config/project/project.yaml index f408f863..bd442432 100644 --- a/config/project/project.yaml +++ b/config/project/project.yaml @@ -1,4 +1,4 @@ -dateModified: 1754917585 +dateModified: 1755090130 elementSources: craft\elements\Entry: - diff --git a/modules/statik/src/web/twig/ValidateInputExtension.php b/modules/statik/src/web/twig/ValidateInputExtension.php index 2921bbec..895d739e 100644 --- a/modules/statik/src/web/twig/ValidateInputExtension.php +++ b/modules/statik/src/web/twig/ValidateInputExtension.php @@ -9,7 +9,7 @@ class ValidateInputExtension extends AbstractExtension { - private const COMMON_QUERY_CHARACTERS_REGEX = "/^[a-zA-Z0-9.!?\s'\"]+$/"; + private const COMMON_QUERY_CHARACTERS_REGEX = "/^[a-zA-Z0-9.!?@;:éÉèÈêÊàÀëËïÏ\s'\"]+$/"; public function getTests(): array {