Skip to content

Commit 3608709

Browse files
committed
Attendance: Fix escaping of language var in JS context preventing comments to be added in attendance in courses in French - refs BT#22344
1 parent 798af0f commit 3608709

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

main/attendance/attendance_comment.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
$("#comment-popup-save").on("click", function() {
2525
var comment = $("#txt-comment").val();
2626
if (comment == '') {
27-
alert('<?php echo get_lang('ProvideACommentFirst'); ?>');
27+
alert('<?php echo addslashes(get_lang('ProvideACommentFirst')); ?>');
2828
return false;
2929
}
3030
var selected = $("#comment-selected").val();

main/attendance/attendance_signature.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
$("#sign_popup_save").on("click", function() {
6565
if (signaturePad.isEmpty()) {
66-
alert('<?php echo get_lang('ProvideASignatureFirst'); ?>');
66+
alert('<?php echo addslashes(get_lang('ProvideASignatureFirst')); ?>');
6767
return false;
6868
}
6969
var selected = $("#sign-selected").val();

0 commit comments

Comments
 (0)