mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 21:04:06 -07:00
JSON not JS brainfart
This commit is contained in:
parent
0682f7b10c
commit
7c4e9bad7d
1 changed files with 1 additions and 1 deletions
|
@ -1193,7 +1193,7 @@ class UploadHandler
|
||||||
}
|
}
|
||||||
if(!headers_sent()){
|
if(!headers_sent()){
|
||||||
// this is the most likely/expected path.
|
// this is the most likely/expected path.
|
||||||
header("Content-Type: text/javascript; charset=UTF-8");
|
header("Content-Type: application/json");
|
||||||
} else {
|
} else {
|
||||||
// html-encode json to prevent xss...
|
// html-encode json to prevent xss...
|
||||||
$json = htmlentities($json, ENT_QUOTES | ENT_SUBSTITUTE | ENT_DISALLOWED | ENT_HTML401);
|
$json = htmlentities($json, ENT_QUOTES | ENT_SUBSTITUTE | ENT_DISALLOWED | ENT_HTML401);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue