calc: escape the Date Calculator labels (escHtml); CHANGELOG v2.6.1

Completes the v2.6.0 escaping pass: the From/to description labels go through escHtml at the
date-menu render, the Print Date Durations label swap, and the restore after the image export.
Cache-bust bumps for the three scripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
malonehunterandClaude Opus 5.5 committed 2026-10-07 06:08:39 -04:00
1 parent 7d76b1f550
commit d025c7e810
5 files changed
+16 -9

No files matched your search

+2 -2
View File
@@ -191,9 +191,9 @@ function toggleDateCalcMenu() {
o += '<div class="dateCalcBg">'
o += '<table class="dateCalcTable2"><tbody>'
o += '<tr style="line-height: 0.9em;"><td><div id="dateDesc1Area"><input class="dateDescription" id="dateDesc1" value="'+dateDesc1Saved+'"></div></td></tr>' // Date 1 label
o += '<tr style="line-height: 0.9em;"><td><div id="dateDesc1Area"><input class="dateDescription" id="dateDesc1" value="'+escHtml(dateDesc1Saved)+'"></div></td></tr>' // Date 1 label
o += '<tr style="line-height: 0.9em;"><td style="padding-bottom: 0.5em;"><span id="d1full_t2" class="dateDetailsText"></span></td></tr>' // Date 1
o += '<tr style="line-height: 0.9em;"><td><div id="dateDesc2Area"><input class="dateDescription" id="dateDesc2" value="'+dateDesc2Saved+'"></div></td></tr>' // Date 2 label
o += '<tr style="line-height: 0.9em;"><td><div id="dateDesc2Area"><input class="dateDescription" id="dateDesc2" value="'+escHtml(dateDesc2Saved)+'"></div></td></tr>' // Date 2 label
o += '<tr style="line-height: 0.9em;"><td style="padding-bottom: 0.5em;"><span id="d2full_t2" class="dateDetailsText"></span></td></tr>' // Date 2
o += '<tr><td style="background: var(--menu-bg-accent); padding: 0.4em 0.75em 0.5em 0.75em;"><span id="dateDurValues" class="dateDetailsText"></span></td></tr>'
o += '</tbody></table>'
+2 -2
View File
@@ -20,8 +20,8 @@ function openImageWindow(element, imgName = "", sRatio = window.devicePixelRatio
imageDataURL = trimCanvas(canvas); // canvas to "data:image/png;base64, ..."
if (element == '.dateCalcTable2') { // restore date labels as input
$('#dateDesc1Area').html('<input class="dateDescription" id="dateDesc1" value="'+dateDesc1Saved+'">')
$('#dateDesc2Area').html('<input class="dateDescription" id="dateDesc2" value="'+dateDesc2Saved+'">')
$('#dateDesc1Area').html('<input class="dateDescription" id="dateDesc1" value="'+escHtml(dateDesc1Saved)+'">')
$('#dateDesc2Area').html('<input class="dateDescription" id="dateDesc2" value="'+escHtml(dateDesc2Saved)+'">')
$('.dateCalcTable2').removeClass('elemBorderScr') // add outline
}
+2 -2
View File
@@ -331,8 +331,8 @@ $(document).ready(function(){
openImageWindow(".HistoryTable", fileName, 2.0);
});
$("body").on("click", "#btn-date-calc-png", function () {
$('#dateDesc1Area').html('<span class="dateDescription">'+dateDesc1Saved+'</span>') // input to fixed text
$('#dateDesc2Area').html('<span class="dateDescription">'+dateDesc2Saved+'</span>')
$('#dateDesc1Area').html('<span class="dateDescription">'+escHtml(dateDesc1Saved)+'</span>') // input to fixed text
$('#dateDesc2Area').html('<span class="dateDescription">'+escHtml(dateDesc2Saved)+'</span>')
$('.dateCalcTable2').addClass('elemBorderScr') // add outline
// phrase-with-spaces_2021-03-26_10-23-52_table.png
var fileName = (saved_d1.getMonth()+1)+'-'+saved_d1.getDate()+'-'+saved_d1.getFullYear()+'_'+