all repos — cameraman @ ea026af8882b8a7bec32ddc321ac152e07e30d9b

minor bug fixes
BiRabittoh andronacomarco@gmail.com
Thu, 06 Jun 2024 22:06:29 +0200
commit

ea026af8882b8a7bec32ddc321ac152e07e30d9b

parent

7b8b3122dd3849fe58387787b72b301c89faa02d

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M templates/index.htmltemplates/index.html

@@ -252,6 +252,10 @@ </td>

`; } + function escapeQuotes(str) { + return str.replace(/'/g, "\\'"); + } + function createInputFields(id, name, description, day, month, year, notify, notified, isNew) { const myName = name || ''; const myDescription = description || '';

@@ -271,7 +275,7 @@ <td data-field="notified" data-value="${notified}"><input type="checkbox" id="notified-${id}" ${notified ? 'checked' : 'disabled'}></td>

<td class="actions"> ${isNew ? '' : ` <i class="fas fa-save" title="Save" onclick="saveOccurrence(${id})"></i> - <i class="fas fa-times" title="Cancel" onclick="cancelEdit(${id}, '${name}', '${description}', ${day}, ${month}, ${notify})"></i> + <i class="fas fa-times" title="Cancel" onclick="cancelEdit(${id}, '${escapeQuotes(name)}', '${escapeQuotes(description)}', ${day}, ${month}, ${year}, ${notify})"></i> `} </td> `;