details:   https://code.tryton.org/tryton/commit/c28948894371
branch:    7.4
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 d93ebc421436 -r c28948894371 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.4.20 - 2025-11-02
 ---------------------------
diff -r d93ebc421436 -r c28948894371 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
@@ -3812,9 +3812,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