minor bug fixes
BiRabittoh andronacomarco@gmail.com
Thu, 06 Jun 2024 22:06:29 +0200
1 files changed,
5 insertions(+),
1 deletions(-)
jump to
M
templates/index.html
→
templates/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> `;