[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] User Information: popover is missing the generated DiceBear user avatar

"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a07149cb53e7_383e6aebc9516@gitlab-sidekiq-low-urgency-cpu-bound-v2-6f497b968d-bg7b2.mail>

luci pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
c5bdad1e by Espoir Baraka at 2026-05-15T12:24:19+00:00
[FIX] User Information: popover is missing the generated DiceBear user avatar
---
* [FIX] tiki_popover: Disable sanitization and enhance avatar rendering on popover shown event

See merge request tikiwiki/tiki!10219

- - - - -


1 changed file:

- lib/jquery_tiki/tiki-jquery.js


Changes:

=====================================
lib/jquery_tiki/tiki-jquery.js
=====================================
@@ -404,6 +404,15 @@ $.fn.tiki_popover = function () {
         myDefaultAllowList.input = ["name", "value", "type"];
         myDefaultAllowList.button = ["type", "disabled", "name", "value", "onclick"];
         myDefaultAllowList.time = ["datetime"];    // for timeago
+        // DiceBear placeholders in user-info ajaxtips
+        if (!myDefaultAllowList.div) {
+            myDefaultAllowList.div = [];
+        }
+        ['data-seed', 'data-style', 'data-size'].forEach(function (attr) {
+            if (myDefaultAllowList.div.indexOf(attr) === -1) {
+                myDefaultAllowList.div.push(attr);
+            }
+        });
         myDefaultAllowList.a = [
             "target",
             "href",
@@ -696,8 +705,20 @@ $(function() { // JQuery's DOM is ready event - before onload
     }
 
     // Colorbox can be applied to Bootstrap popover elements
-    $(document).on('shown.bs.popover', function () {
+    $(document).on('shown.bs.popover', function (e) {
         $.applyColorbox();
+        var tid = e.target.getAttribute && e.target.getAttribute('aria-describedby');
+        var tipEl = tid && document.getElementById(tid);
+        if (tipEl && tipEl.querySelector('.dicebear-avatar')) {
+            window.setTimeout(function () {
+                import('avatar-generator').then(function (mod) {
+                    if (mod.renderAvatars) {
+                        mod.renderAvatars();
+                    }
+                }).catch(function () {
+                });
+            }, 0);
+        }
     });
 
     if (jqueryTiki.zoom) {



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/c5bdad1e152b61f8d55a268f102663d4a2edf6d1

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/c5bdad1e152b61f8d55a268f102663d4a2edf6d1
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.