Skip to content

Commit

Permalink
Hotfix: 知乎用户动态 (DIYgod#1080)
Browse files Browse the repository at this point in the history
类型为 `question` 的动态,之前 `title` 与 `description` 取的字段是 `detail` 和 `excerpt`,导致标题出现 HTML 标签,类似乱码的效果,`description` 则内容不完整:
<img width="708" alt="wx20181106-142212 2x" src="https://user-images.githubusercontent.com/5186792/48046748-7fe59680-e1d0-11e8-8e44-d53b8f56f26d.png">

修改后的:
<img width="1387" alt="wx20181106-142307 2x" src="https://user-images.githubusercontent.com/5186792/48046762-925fd000-e1d0-11e8-9a12-86e1f4e71c24.png">
  • Loading branch information
xyqfer authored and DIYgod committed Nov 6, 2018
1 parent 0a2f516 commit e2218f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routes/zhihu/activities.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ module.exports = async (ctx) => {
url = `https://www.zhihu.com/pin/${detail.id}`;
break;
case 'question':
title = utils.ProcessImage(detail.detail);
description = detail.excerpt;
title = detail.title;
description = utils.ProcessImage(detail.detail);
url = `https://www.zhihu.com/question/${detail.id}`;
break;
case 'column':
Expand Down

0 comments on commit e2218f8

Please sign in to comment.