Repository navigation
修复 LaTeX 导入数据丢失与 HTML 注入,补充回归测试 - #1
Merged
Merged
Conversation
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.
导入
.tex后,即使未编辑,原实现也可能丢失标题后的标签与正文、代码清单中的%、多张图片和自定义列表项;以<开头的源码还会被直接写入innerHTML。本次将导入转换改为保留原始源码与节点快照,未编辑区段按原文导出,复杂结构回退为可编辑原文块。所有源码文本及属性均转义,旧草稿加载时清理危险 HTML。
htbp,必要时补充graphicx;UTF-8 读取保留 BOM,拒绝无效编码。main和dev,部署与发布在同一提交检查通过后执行。验证通过:
node --check main.jsnode tests/smoke.mjsnode --test:70 通过,0 失败。git diff --check回归测试调用真实函数,并使用最小 DOM 模型;尚未进行真实浏览器交互或 TeX 编译验证。复杂环境、多图、可选标签列表和
equation环境以可编辑原文块呈现。