fix: avoid pre-sanitizing markdown source#12004
fix: avoid pre-sanitizing markdown source#12004wanghe-fit2cloud merged 1 commit into1Panel-dev:dev-v2from
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/lgtm |
What this PR does / why we need it?
关联 Issue: #11998
目标: 修复 Markdown 代码块中 </> 被过度防御转义的问题。
背景: 组件此前在 Markdown 渲染前先对原始内容做 DOMPurify.sanitize,会影响代码块文本显示。
Summary of your change
将 mkdown-editor 的输入从 v-model="sanitizedReadMe" 改为 :model-value="props.content",不再预处理 Markdown 源文本。
新增 sanitizeHtml 并通过 :sanitize="sanitizeHtml" 交给 MdEditor 在 HTML 阶段进行消毒。
Please indicate you've done the following: