Skip to content

Commit

Permalink
Sanitize JS string fort alert()
Browse files Browse the repository at this point in the history
  • Loading branch information
ymollard committed Oct 18, 2024
1 parent f9eb82d commit a66e1d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/takepos/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ function CloseBill() {
if (!empty($conf->global->TAKEPOS_FORBID_SALES_TO_DEFAULT_CUSTOMER)) {
echo "customerAnchorTag = document.querySelector('a[id=\"customer\"]'); ";
echo "if (customerAnchorTag && customerAnchorTag.innerText.trim() === '".$langs->trans("Customer")."') { ";
echo "alert('".$langs->trans("NoClientErrorMessage")."'); ";
echo "alert('".dol_escape_js($langs->trans("NoClientErrorMessage"))."'); ";
echo "return; } \n";
}
?>
Expand Down

0 comments on commit a66e1d8

Please sign in to comment.