Skip to content

Commit 2991070

Browse files
committed
fixed #8
1 parent c345d26 commit 2991070

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/zhihu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
initDownloadDir(true);
1515

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

1919
foreach ($json as $sugg) {
2020
if (is_array($sugg)) {

0 commit comments

Comments
 (0)