Repository navigation
fix: safely embed prompt data in generated gallery HTML - #5
Open
wangkeyu-u wants to merge 1 commit into
Open
wangkeyu-u wants to merge 1 commit into
wangkeyu-u wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
画廊提示词中的
</script>或 HTML 注释可能破坏内嵌脚本,甚至使附加脚本执行;$&等 replacement token 也会改变生成数据。构建器现在将 JSON 中的
<和 Unicode 分隔符作等价转义,并以回调填入模板,使特殊字符完整恢复为数据。重新生成页面;230 条数据及模板内容不变。验证:真实模板与 Chromium 的七项回归在修复前有五项失败,修复后全部通过;检查完整数据 roundtrip、附加脚本未执行、只有一个 script、画廊初始化完成且没有 pageerror。原有 230 条目功能和复制检查通过,独立重建结果一致。CI 增加新浏览器回归,审计及检查 Agent 独立复核通过。
范围仅为
gen-gallery.js的脚本 JSON 嵌入。该 PR 以 main 为基准,与 #4 的复制验收改动独立。