hookehuyr

docs(changelog): 记录 htmlUtils 工具库新增

- 添加 htmlUtils.js 工具函数库详细记录
- 记录 200+ HTML 实体解码支持
- 记录新增的 4 个工具函数
- 记录 RichTextRenderer 重构内容

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
......@@ -58,6 +58,26 @@
**相关提交**:
- `ac207cf` - docs(changelog): 移除错误添加的项目功能变更记录
### 13:35:17 - refactor(utils): 新增 htmlUtils 工具库并重构 RichTextRenderer
**影响文件**:
- `src/utils/htmlUtils.js` - 新增 HTML 工具函数库
- `src/components/RichTextRenderer.vue` - 使用工具库,移除内联实现
**变更摘要**:
- 新增 htmlUtils.js 工具函数库,包含 200+ HTML 实体解码支持
- 支持 DOM API(H5)和手动映射(小程序)双模式自适应
- 新增工具函数:
- `decodeHtmlEntities()` - HTML 实体解码(支持基本符号、货币、数学符号、希腊字母等)
- `encodeHtmlEntities()` - HTML 实体编码(XSS 防护)
- `stripHtmlTags()` - 移除 HTML 标签
- `truncateHtml()` - 截取 HTML 并保留标签完整性
- RichTextRenderer 组件改用工具库,移除内联实现(减少 53 行代码)
- 清理所有测试 console.log(保留 error 日志)
**相关提交**:
- `fb33196` - refactor(utils): 新增 htmlUtils 工具库并重构 RichTextRenderer
---
## 2026-02-27
......