mirror of
https://github.com/serghey-rodin/vesta.git
synced 2026-07-09 09:52:35 +02:00
JSON not JS brainfart
This commit is contained in:
@@ -1193,7 +1193,7 @@ class UploadHandler
|
||||
}
|
||||
if(!headers_sent()){
|
||||
// this is the most likely/expected path.
|
||||
header("Content-Type: text/javascript; charset=UTF-8");
|
||||
header("Content-Type: application/json");
|
||||
} else {
|
||||
// html-encode json to prevent xss...
|
||||
$json = htmlentities($json, ENT_QUOTES | ENT_SUBSTITUTE | ENT_DISALLOWED | ENT_HTML401);
|
||||
|
||||
Reference in New Issue
Block a user