details:   https://code.tryton.org/tryton/commit/7e02966397a5
branch:    7.6
user:      Cédric Krier <[email protected]>
date:      Thu Nov 20 17:03:46 2025 +0100
description:
        Escape completion content with custom format

        Closes #14363
        (grafted from cd3931840db95bf96064b7f4f44f068f78df3c76)
diffstat:

 sao/CHANGELOG     |  1 +
 sao/src/common.js |  8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r e83a8130258d -r 7e02966397a5 sao/CHANGELOG
--- a/sao/CHANGELOG     Mon Nov 17 12:26:57 2025 +0100
+++ b/sao/CHANGELOG     Thu Nov 20 17:03:46 2025 +0100
@@ -1,3 +1,4 @@
+* Escape completion content with custom format (issue14363)
 
 Version 7.6.10 - 2025-11-02
 ---------------------------
diff -r e83a8130258d -r 7e02966397a5 sao/src/common.js
--- a/sao/src/common.js Mon Nov 17 12:26:57 2025 +0100
+++ b/sao/src/common.js Thu Nov 20 17:03:46 2025 +0100
@@ -3832,9 +3832,13 @@
         },
         _format: function(content) {
             if (this.format) {
-                return this.format(content);
+                content = this.format(content);
             }
-            return jQuery('<span/>').text(content);
+            if (content instanceof jQuery) {
+                return content;
+            } else {
+                return jQuery('<span/>').text(content);
+            }
         },
         _format_action: function(content) {
             if (this.format_action) {

Reply via email to