From 22f15e20bba88f7ea22d61dbf010648faa1ddd0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 20 Nov 2025 17:03:46 +0100 Subject: [PATCH] Escape completion content with custom format Closes #14363 (grafted from cd3931840db95bf96064b7f4f44f068f78df3c76) --HG-- branch : 7.0 --- sao/CHANGELOG | 1 + sao/src/common.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sao/CHANGELOG b/sao/CHANGELOG index 09abd951e7..c2b81bcb81 100644 --- a/sao/CHANGELOG +++ b/sao/CHANGELOG @@ -1,3 +1,4 @@ +* Escape completion content with custom format (issue14363) Version 7.0.39 - 2025-11-02 --------------------------- diff --git a/sao/src/common.js b/sao/src/common.js index ad66ccf082..5182bf2ecf 100644 --- a/sao/src/common.js +++ b/sao/src/common.js @@ -3840,9 +3840,13 @@ }, _format: function(content) { if (this.format) { - return this.format(content); + content = this.format(content); + } + if (content instanceof jQuery) { + return content; + } else { + return jQuery('').text(content); } - return jQuery('').text(content); }, _format_action: function(content) { if (this.format_action) {