Skip to content

fix(zhihu): decode numeric entities in answer detail#1629

Merged
jackwener merged 1 commit into
jackwener:mainfrom
lenovobenben:fix/zhihu-answer-detail-entities
May 18, 2026
Merged

fix(zhihu): decode numeric entities in answer detail#1629
jackwener merged 1 commit into
jackwener:mainfrom
lenovobenben:fix/zhihu-answer-detail-entities

Conversation

@lenovobenben
Copy link
Copy Markdown
Contributor

Summary

  • decode decimal and hexadecimal HTML numeric entities in Zhihu answer-detail content
  • keep invalid numeric entities unchanged instead of throwing
  • add unit coverage for numeric entity decoding

Why

Zhihu answer HTML can include numeric entities such as " and &. The answer-detail stripper decoded a few named entities but left numeric entities visible in the returned text.

Validation

@jackwener jackwener merged commit ec3b7da into jackwener:main May 18, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants