Escape control-characters in generated swagger
When some table's description has `control-characters`, likes `\t` `\n`, swagger that generated by `/api.php` is a defective json
This commit is contained in:
parent
ef4322b6c0
commit
812f6ad591
1 changed files with 1 additions and 1 deletions
2
api.php
2
api.php
|
|
@ -2367,7 +2367,7 @@ class PHP_CRUD_API {
|
|||
if ($i>0) echo ',';
|
||||
echo '{';
|
||||
echo '"name":"'.$table['name'].'",';
|
||||
echo '"description":"'.$table['comments'].'"';
|
||||
echo '"description":'.json_encode($table['comments']);
|
||||
echo '}';
|
||||
}
|
||||
echo '],';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue