Last modified by Super Admin on 2026/04/05 18:59

From version Icon 106.1 Icon
edited by Super Admin
on 2026/03/22 02:12
Change comment: There is no comment for this version
To version Icon 102.1 Icon
edited by XWikiGuest
on 2026/03/22 00:26
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.superadmin
1 +XWiki.XWikiGuest
Content
... ... @@ -1557,15 +1557,7 @@
1557 1557   };
1558 1558   var toast = document.createElement('div');
1559 1559   toast.className = 'toast toast-' + type;
1560 - var iconSvg = icons[type] || '';
1561 - if (iconSvg) {
1562 - var iconSpan = document.createElement('span');
1563 - iconSpan.innerHTML = iconSvg;
1564 - toast.appendChild(iconSpan);
1565 - }
1566 - var msgSpan = document.createElement('span');
1567 - msgSpan.textContent = message;
1568 - toast.appendChild(msgSpan);
1560 + toast.innerHTML = (icons[type] || '') + '<span>' + message + '</span>';
1569 1569   container.appendChild(toast);
1570 1570   setTimeout(function() { toast.remove(); }, 3200);
1571 1571  }
... ... @@ -1604,7 +1604,6 @@
1604 1604   var html = '<textarea id="editContent_' + postObjNum + '">' + currentContent.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;') + '</textarea>';
1605 1605  
1606 1606   // コメント以外は添付ファイル編集を表示
1607 - function escAttr(s) { return s.replace(/&/g,'&amp;').replace(/"/g,'&quot;').replace(/'/g,'&#39;').replace(/</g,'&lt;').replace(/>/g,'&gt;'); }
1608 1608   if (postType !== 'comment') {
1609 1609   // 既存画像
1610 1610   html += '<div class="edit-attachments">';
... ... @@ -1614,10 +1614,10 @@
1614 1614   for (var i = 0; i < imgs.length; i++) {
1615 1615   var img = imgs[i].trim();
1616 1616   if (!img) continue;
1617 - html += '<div class="edit-attach-item" data-name="' + escAttr(img) + '">' +
1608 + html += '<div class="edit-attach-item" data-name="' + img.replace(/"/g,'&quot;') + '">' +
1618 1618   '<img src="/xwiki/bin/download/' + schoolPage.replace(/\./g,'/') + '/' + encodeURIComponent(img) + '" class="edit-attach-thumb" />' +
1619 1619   '<button type="button" class="edit-attach-remove" onclick="removeEditAttach(this)" title="削除">✕</button>' +
1620 - '<input type="hidden" name="keepImages" value="' + escAttr(img) + '" />' +
1611 + '<input type="hidden" name="keepImages" value="' + img.replace(/"/g,'&quot;') + '" />' +
1621 1621   '</div>';
1622 1622   }
1623 1623   html += '</div>';
... ... @@ -1631,10 +1631,10 @@
1631 1631   if (!f) continue;
1632 1632   var displayName = f;
1633 1633   if (/^file_\d{14}_\d+_/.test(f)) displayName = f.replace(/^file_\d{14}_\d+_/, '');
1634 - html += '<div class="edit-attach-item" data-name="' + escAttr(f) + '">' +
1635 - '<span class="edit-attach-fname">' + escAttr(displayName) + '</span>' +
1625 + html += '<div class="edit-attach-item" data-name="' + f.replace(/"/g,'&quot;') + '">' +
1626 + '<span class="edit-attach-fname">' + displayName.replace(/</g,'&lt;').replace(/>/g,'&gt;') + '</span>' +
1636 1636   '<button type="button" class="edit-attach-remove" onclick="removeEditAttach(this)" title="削除">✕</button>' +
1637 - '<input type="hidden" name="keepFiles" value="' + escAttr(f) + '" />' +
1628 + '<input type="hidden" name="keepFiles" value="' + f.replace(/"/g,'&quot;') + '" />' +
1638 1638   '</div>';
1639 1639   }
1640 1640   html += '</div>';