Skip to content

0.9.31#444

Merged
shd101wyy merged 5 commits into
developfrom
fix/bugs-june-7
Jun 8, 2026
Merged

0.9.31#444
shd101wyy merged 5 commits into
developfrom
fix/bugs-june-7

Conversation

@shd101wyy

Copy link
Copy Markdown
Owner

No description provided.

shd101wyy added 5 commits June 7, 2026 23:18
The transformer's ^block-id regex incorrectly matched LaTeX like
"a ^n" inside 51190...51190 display math blocks, injecting
<span class="block-id"> tags and corrupting the formula before
either KaTeX or MathJax could render it.

Now track display math block boundaries via the configured
mathBlockDelimiters and pass content through verbatim, matching
the same protection already given to code blocks.

Fixes #2321
…mplates

head.html was injected raw into <head> without sanitization, executing
before the React app and any DOMPurify/CSP defenses. A malicious repo
could include scripts that traverse React internals to reach
acquireVsCodeApi() and send arbitrary messages to the extension host.

resolvePathsInHeader() now removes all <script> tags from the header
content before injection, while preserving <style>, <meta>, and <link>
tags. Thanks to @ritikchaddha for reporting.

Fixes GHSA-mcwg-4j78-qwv3
The preview scrollbar thumb used a fixed gray color that blended into
dark backgrounds, making it invisible unless hovered. Now uses VS Code's
--vscode-scrollbarSlider-background and --vscode-scrollbarSlider-hoverBackground
CSS variables which adapt to the active color theme, with the original
gray as a fallback for non-VSCode contexts.

Fixes #2322
Now that all <script> tags are stripped, the path resolution loop
that loaded and inlined relative scripts was dead code — it read
files from disk only to immediately discard them.
- Fix ^block-id injection inside $...$ display math blocks (#2321)
- Fix invisible scrollbar thumb in dark mode (#2322)
- Strip <script> tags from head.html (GHSA-mcwg-4j78-qwv3)
@shd101wyy shd101wyy merged commit 8c55a2b into develop Jun 8, 2026
2 checks passed
@shd101wyy shd101wyy deleted the fix/bugs-june-7 branch June 8, 2026 02:49
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.

1 participant