]> source.dussan.org Git - gitea.git/commitdiff
Fix issue with user.fullname (#8902)
authorzeripath <art27@cantab.net>
Sat, 9 Nov 2019 23:21:53 +0000 (23:21 +0000)
committerGitHub <noreply@github.com>
Sat, 9 Nov 2019 23:21:53 +0000 (23:21 +0000)
templates/base/footer.tmpl

index 5a3d24ab58659c63ccd8885933871037903ee4bc..bed8eea01953a35f137c310431d0f4d948f6e5ac 100644 (file)
                        noMatchTemplate: function () { return null },
                        menuItemTemplate: function (item) {
                                var user = item.original;
-                               var itemStr = '<img src="' + user.avatar + '"/><span class="name">' + user.name + '</span>';
+                               var item = $('<div/>')
+                               item.append($('<img/>', {'src': user.avatar}))
+                               item.append($('<span/>', {'class': 'name'}).text(user.name))
                                if (user.fullname && user.fullname != '') {
-                                       itemStr += '<span class="fullname">' + user.fullname + '</span>';
+                                       item.append($('<span/>', {'class': 'fullname'}).text(user.fullname))
                                }
-                               return itemStr;
+                               return item.html();
                        }
                });
                var content = document.getElementById('content');