Fix: UI.escape definieren + Transponder-Karte immer im Profil anzeigen

- UI.escape() fehlte im Public-API von ui.js (crash nach Profil speichern)
- Chip-Nr.-Karte im Hunde-Profil immer sichtbar, auch ohne Wert
- "Eintragen"-Button öffnet Inline-Edit-Modal direkt im Profil
- SW-Cache by-v143
This commit is contained in:
rene 2026-04-17 15:29:57 +02:00
parent 94e0ed3daa
commit d5f09cd16b
3 changed files with 60 additions and 8 deletions

View file

@ -259,6 +259,15 @@ const UI = (() => {
`;
}
function escape(str) {
if (!str) return '';
return String(str)
.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
}
// Öffentliche API
return {
toast, modal,
@ -267,6 +276,7 @@ const UI = (() => {
emptyState, time,
setupPhotoPreview, scrollTop, skeleton,
icon: _svgIcon,
escape,
};
})();