The bug is in the xwiki-filter plugin. https://github.com/xwiki/xwiki-platform/blob/49b9277aece9584559c1fe2b5fd0476abfac9786/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-plugins/src/main/webjar/xwiki-filter/plugin.js#L264 When recovering the array of text nodes before the carret, the getSiblingTextNodes function returns the nodes in reverse order. The maybeFixNonBreakingSpace function however expects the nodes to be in the normal order. I'm now going to write a test for this. Thanks. |