Closed hellodword closed 2 years ago
74417e757cb9b1084f650c25d6a4f0ec184322be 是在这个commit引入的逻辑,应该是处理某些特殊xml解析异常。现在已经找不到当时的badcase,先合该代码,后续发现异常情况再进行修复。
Merging #187 (4b0e339) into master (5c856b5) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #187 +/- ##
=======================================
Coverage 11.06% 11.06%
=======================================
Files 14 14
Lines 660 660
=======================================
Hits 73 73
Misses 577 577
Partials 10 10
Flag | Coverage Δ | |
---|---|---|
unittests | 11.06% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
我不太确定这段代码的初衷(似乎是为了处理某些不标准编码导致的乱码?):
https://github.com/indes/flowerss-bot/blob/5c856b58ad7acb98c8f0525f4c5488f4228b8390/internal/fetch/fetch.go#L19-L31
但是它会导致 encoding 为 gbk 的 feed 出现乱码
简单复现: