Skip to content

Commit a66e1d8

Browse files
committed
Sanitize JS string fort alert()
1 parent f9eb82d commit a66e1d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

htdocs/takepos/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ function CloseBill() {
597597
if (!empty($conf->global->TAKEPOS_FORBID_SALES_TO_DEFAULT_CUSTOMER)) {
598598
echo "customerAnchorTag = document.querySelector('a[id=\"customer\"]'); ";
599599
echo "if (customerAnchorTag && customerAnchorTag.innerText.trim() === '".$langs->trans("Customer")."') { ";
600-
echo "alert('".$langs->trans("NoClientErrorMessage")."'); ";
600+
echo "alert('".dol_escape_js($langs->trans("NoClientErrorMessage"))."'); ";
601601
echo "return; } \n";
602602
}
603603
?>

0 commit comments

Comments
 (0)