Fix View:txt and add charset.
This commit is contained in:
parent
404bd59569
commit
7d3d1615d5
@ -54,7 +54,7 @@ class View extends Neuron {
|
|||||||
* @param object $data
|
* @param object $data
|
||||||
*/
|
*/
|
||||||
public function json(object $data) {
|
public function json(object $data) {
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json; charset=utf-8');
|
||||||
print(json_encode($data));
|
print(json_encode($data));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,8 +64,8 @@ class View extends Neuron {
|
|||||||
* @param string $txt
|
* @param string $txt
|
||||||
*/
|
*/
|
||||||
public function text(string $txt) {
|
public function text(string $txt) {
|
||||||
header('Content-Type: text/plain');
|
header('Content-Type: text/plain; charset=utf-8');
|
||||||
print(json_encode($txt));
|
print($txt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user