From 34455742ffeab2cede087d86d277fdfce416a56e Mon Sep 17 00:00:00 2001
From: Marius Dumitru Florea <marius@xwiki.com>
Date: Mon, 19 Dec 2022 13:53:57 +0200
Subject: [PATCH] XWIKI-20489: Upgrade to CKEditor 4.20.1

---
 xwiki-platform-core/xwiki-platform-ckeditor/pom.xml            | 2 +-
 .../src/main/resources/CKEditor/EditSheet.xml                  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/xwiki-platform-core/xwiki-platform-ckeditor/pom.xml b/xwiki-platform-core/xwiki-platform-ckeditor/pom.xml
index 5fab6dfacfe..36755a9036f 100644
--- a/xwiki-platform-core/xwiki-platform-ckeditor/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-ckeditor/pom.xml
@@ -38,7 +38,7 @@
     <module>xwiki-platform-ckeditor-webjar</module>
   </modules>
   <properties>
-    <ckeditor.version>4.19.1</ckeditor.version>
+    <ckeditor.version>4.20.1</ckeditor.version>
 
     <!-- The path to the folder where we clone the CKEditor sources. -->
     <ckeditor.path>${project.build.directory}/ckeditor4-${ckeditor.version}</ckeditor.path>
diff --git a/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/EditSheet.xml b/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/EditSheet.xml
index 11e4ef1972b..62f97a616c3 100644
--- a/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/EditSheet.xml
+++ b/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/EditSheet.xml
@@ -274,7 +274,8 @@
               '&lt;/div&gt;',
               '&lt;div class="ckeditor-autocomplete-item-hint"&gt;{hint}&lt;/div&gt;',
             '&lt;/li&gt;'].join(''),
-          outputTemplate: '&lt;a href="{url}" data-reference="{typed}|-|{type}|-|{reference}"&gt;{label}&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;',
+          outputTemplate: '&lt;a href="{url}" data-reference="{typed}|-|{type}|-|{reference}"&gt;{label}&lt;/a&gt;',
+          followingSpace: true,
           marker: '[',
           minChars: 0,
           itemsLimit: 6
-- 
GitLab