Preview checker: entity names like `&constructor;` decode to function source
维护者通常 1 天内回复
@amitsinha-cell 已经在做这个了。
开始于 2026年10月31日。
评估
这个 Issue 还没有评估数据。
描述
decodeEntities() in src/lib/meta-fetcher.ts looks names up with NAMED_ENTITIES[body], and NAMED_ENTITIES is a plain object, so names that exist on Object.prototype are found too. A page whose title has one of them shows function source in the preview checker:
parseMetaTags('<title>a &constructor; b</title>', 'https://example.com').title
// "a function Object() { [native code] } b"
&toString;, &hasOwnProperty; and &valueOf; do the same. Browsers leave an unknown name like &constructor; as it is.
What to do
- Only decode names that are in
NAMED_ENTITIESitself, for example withObject.hasOwn(NAMED_ENTITIES, body), or make it a null-prototype object or aMap.
Acceptance criteria
-
&constructor;,&toString;,&hasOwnProperty;and&valueOf;stay as they are, and every entity that decodes today still does - A test that fails on the current code
-
npm run check,npm run testandnpm run buildpass
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #NUM in the description.
- 主要语言
- TypeScript
- 星标
- 8
- 派生
- 4
- 平均合并
- 8 小时 47 分钟
- 30 天内合并 PR
- 157
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codercops/ogcops 的其他 Issue
-
[Bug] “Copy Recommended Meta Tags” generates an unusable placeholder image URL可能已有人在做 @CreatorguyS 于 2 天前认领。 未关闭bug enhancement
难度 2/5 1-3 小时 新手友好度 72/100
codercops/ogcops#378 · 4 条评论 ·
维护者通常 1 天内回复
-
[Bug] Clipboard fallback reports success even when copying fails可能已有人在做 @srikar-naidu 于 2 天前认领。 未关闭bug
codercops/ogcops#384 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Add the Do and Don't tutorial template (`tutorial-do-dont`)可能已有人在做 @Ravindar-Amogh-Gummadavelly 于 3 天前认领。 未关闭good first issue templates
codercops/ogcops#355 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 30/100
codercops/ogcops#341 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 35/100
codercops/ogcops#88 · 16 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
mobile-app
难度 2/5 1-3 小时 新手友好度 74/100
Open-Locker/Open-Locker#352 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
leanprover-community/lean4game#589 ·
维护者通常 2 天内回复
-
check:passed streams:add
难度 1/5 1 小时以内 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复