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:
parent
94e0ed3daa
commit
d5f09cd16b
3 changed files with 60 additions and 8 deletions
|
|
@ -259,6 +259,15 @@ const UI = (() => {
|
|||
`;
|
||||
}
|
||||
|
||||
function escape(str) {
|
||||
if (!str) return '';
|
||||
return String(str)
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"');
|
||||
}
|
||||
|
||||
// Öffentliche API
|
||||
return {
|
||||
toast, modal,
|
||||
|
|
@ -267,6 +276,7 @@ const UI = (() => {
|
|||
emptyState, time,
|
||||
setupPhotoPreview, scrollTop, skeleton,
|
||||
icon: _svgIcon,
|
||||
escape,
|
||||
};
|
||||
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue