mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Use strip_tags() for message in prompt_for_confirm() (#991)
This commit is contained in:
parent
8765aaaa3a
commit
f4b2676f66
1 changed files with 3 additions and 3 deletions
|
@ -142,7 +142,7 @@ class Ajax
|
|||
* @param int $error_code
|
||||
* @throws Exception
|
||||
*/
|
||||
public function ajax_die(string $error_msg, int $error_code = E_AJAX_GENERAL_ERROR)
|
||||
public function ajax_die(string $error_msg, int $error_code = E_AJAX_GENERAL_ERROR): void
|
||||
{
|
||||
$this->response['error_code'] = $error_code;
|
||||
$this->response['error_msg'] = strip_tags($error_msg);
|
||||
|
@ -244,14 +244,14 @@ class Ajax
|
|||
* @param string $confirm_msg
|
||||
* @throws Exception
|
||||
*/
|
||||
public function prompt_for_confirm(string $confirm_msg)
|
||||
public function prompt_for_confirm(string $confirm_msg): void
|
||||
{
|
||||
if (empty($confirm_msg)) {
|
||||
$this->ajax_die('false');
|
||||
}
|
||||
|
||||
$this->response['prompt_confirm'] = 1;
|
||||
$this->response['confirm_msg'] = $confirm_msg;
|
||||
$this->response['confirm_msg'] = strip_tags($confirm_msg);
|
||||
$this->send();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue