fix: icônes SVG affichées en texte brut dans les sous-répertoires Gitea (sidebar)
loadSubdir() créait les icônes des enfants avec textContent au lieu de innerHTML : le markup SVG (<svg width=...>) retourné par getSvgIcon() était affiché comme texte brut quand on ouvrait un répertoire de la section Gitea. Le rendu racine (loadSidebarTree) utilisait déjà innerHTML ; aligné.
This commit is contained in:
@@ -290,7 +290,7 @@ document.addEventListener('alpine:init', () => {
|
|||||||
// Icon
|
// Icon
|
||||||
var iconSpan = document.createElement('span');
|
var iconSpan = document.createElement('span');
|
||||||
iconSpan.className = 'sidebar-icon';
|
iconSpan.className = 'sidebar-icon';
|
||||||
iconSpan.textContent = icon;
|
iconSpan.innerHTML = icon; // icon = HTML SVG from getSvgIcon(), NOT text
|
||||||
li.appendChild(iconSpan);
|
li.appendChild(iconSpan);
|
||||||
// Name
|
// Name
|
||||||
var nameSpan = document.createElement('span');
|
var nameSpan = document.createElement('span');
|
||||||
|
|||||||
Reference in New Issue
Block a user