Skip to content

Commit

Permalink
fixed #8
Browse files Browse the repository at this point in the history
  • Loading branch information
zqzten committed Mar 29, 2018
1 parent c345d26 commit 2991070
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zhihu.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
initDownloadDir(true);

$response = request('https://www.zhihu.com/autocomplete?token='.urlencode($query));
$json = json_decode(mb_convert_encoding($response, 'UTF-8', 'HTML-ENTITIES'))[0];
$json = json_decode(html_entity_decode($response, ENT_QUOTES | ENT_HTML5))[0];

foreach ($json as $sugg) {
if (is_array($sugg)) {
Expand Down

0 comments on commit 2991070

Please sign in to comment.