diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e8a040..61b39e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## v2.6.1 + +### Security +- **Date Calculator labels are escaped (`escHtml`).** The From/to description fields were written + into the page as HTML when the date menu redrew and around *Print Date Durations*; they now render + as literal text, completing the v2.6.0 escaping pass. No database or settings changes. + ## v2.6.0 ### Security diff --git a/calc/date-calc.js b/calc/date-calc.js index a9a916f..4e997dd 100644 --- a/calc/date-calc.js +++ b/calc/date-calc.js @@ -191,9 +191,9 @@ function toggleDateCalcMenu() { o += '
' o += '' - o += '' // Date 1 label + o += '' // Date 1 label o += '' // Date 1 - o += '' // Date 2 label + o += '' // Date 2 label o += '' // Date 2 o += '' o += '
' diff --git a/calc/export.js b/calc/export.js index e4ad2d8..ed09711 100644 --- a/calc/export.js +++ b/calc/export.js @@ -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('') - $('#dateDesc2Area').html('') + $('#dateDesc1Area').html('') + $('#dateDesc2Area').html('') $('.dateCalcTable2').removeClass('elemBorderScr') // add outline } diff --git a/calc/init-variables.js b/calc/init-variables.js index 039b6c7..86e9ff0 100644 --- a/calc/init-variables.js +++ b/calc/init-variables.js @@ -331,8 +331,8 @@ $(document).ready(function(){ openImageWindow(".HistoryTable", fileName, 2.0); }); $("body").on("click", "#btn-date-calc-png", function () { - $('#dateDesc1Area').html(''+dateDesc1Saved+'') // input to fixed text - $('#dateDesc2Area').html(''+dateDesc2Saved+'') + $('#dateDesc1Area').html(''+escHtml(dateDesc1Saved)+'') // input to fixed text + $('#dateDesc2Area').html(''+escHtml(dateDesc2Saved)+'') $('.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()+'_'+ diff --git a/index.html b/index.html index b577820..d9fd5f9 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,7 @@ - + @@ -149,11 +149,11 @@ - + - +