details:   https://code.tryton.org/tryton/commit/8df0d6178ddb
branch:    6.0
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 c6dfeebc781c -r 8df0d6178ddb 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 6.0.68 - 2025-11-02
 ---------------------------
diff -r c6dfeebc781c -r 8df0d6178ddb 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
@@ -3651,9 +3651,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