← 返回列表
D

dsh-html-escape

v0.1.0 · 0 天前发布

HTML 实体编解码:转义/反转义 HTML 特殊字符与常用实体

deepseek-harnessdshdsh-pluginhtmlescape实体

README

dsh-html-escape · HTML 实体编解码



转义/反转义 HTML 特殊字符与常用实体。纯 Node 实现。

提供的工具



| 工具 | 作用 |
|---|---|
| html_escape | 转义 & < > " ' |
| html_unescape | 反转义实体 |

安装



bash

dsh plugin add dsh-html-escape

安装后在 profile 的 package.json 的 dsh.profile.bundles 中加入 "dsh-html-escape"。

用法示例





把这段用户输入转义,防止 XSS
→ 调用 html_escape(text="<script>alert(1)</script>")

版本兼容矩阵

DSH 版本状态说明
dsh@0.1.0-rc.6 ✅ 兼容 cordis patch ✅
dsh@0.1.0 ✅ 兼容 标准 patch ✅
dsh@0.2.0 ⚠️ 待验证 待实测(API 可能在变)
dsh@0.3.0+ ❓ 未知 尚未发布

💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正

元数据

License
MIT
npm
dsh-html-escape
Repo
—
Engines
{}
Weekly DL
0
Monthly DL
0
dsh.bundle
{"bundle":{"patch":"./cordis.patch.yml"}}