Skip to content

Avoid re-sanitizing markdown during rendering #259655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 5, 2025

Conversation

mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Aug 4, 2025

Currently rendering markdown sanitizes the content twice. When creating the output element it also goes: string -> dom-> string -> dom (with other hops potentially in the implementation)

This change changes to a single pass that goes string -> dom with a single sanitize call. Since we are moving away from DomParser, the output is slightly changed

Currently rendering markdown sanitizes the content twice. When creating the output element it also goes: `string -> dom-> string -> dom` (with other hops potentially in the implementation)

This change changes to a single pass that goes `string -> dom` with a single sanitize call. Since we are moving away from DomParser, the output is slightly changed
@mjbvz mjbvz marked this pull request as ready for review August 4, 2025 22:30
Copy link

⚠️ This PR originates from a fork. Due to security restrictions, pipelines from forks are no longer triggered automatically. Learn more.

If the changes appear safe, you can manually trigger the pipeline by commenting /AzurePipelines run.

@vs-code-engineering vs-code-engineering bot added this to the August 2025 milestone Aug 4, 2025
@mjbvz mjbvz merged commit 16992b2 into microsoft:main Aug 5, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants