Skip to content

Commit

Permalink
fix #2132 #1982 JSON 응답 시 control 문자 encoding 적용
Browse files Browse the repository at this point in the history
- 사이트맵 출력이 안 되는 문제 등
  • Loading branch information
bnu committed Sep 1, 2017
1 parent 128010b commit 8fa69dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion classes/display/JSONDisplayHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ function toDoc(&$oModule)
$variables = $oModule->getVariables();
$variables['error'] = $oModule->getError();
$variables['message'] = $oModule->getMessage();
$json = str_replace(array("\r\n", "\n", "\t"), array('\n', '\n', '\t'), json_encode2($variables));

$json = json_encode2($variables);
$json = str_replace(array("\r\n", "\n", "\t"), array('\n', '\n', '\t'), $json);
$json = filter_var($json, FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW);

return $json;
}

Expand Down

0 comments on commit 8fa69dc

Please sign in to comment.