Skip to content

Fix malformed Live Preview URL construction#841

Open
dknn wants to merge 2 commits into
microsoft:mainfrom
dknn:codex/fix-live-preview-url-normalization
Open

Fix malformed Live Preview URL construction#841
dknn wants to merge 2 commits into
microsoft:mainfrom
dknn:codex/fix-live-preview-url-normalization

Conversation

@dknn

@dknn dknn commented Jun 17, 2026

Copy link
Copy Markdown

Summary

  • Preserve absolute http:// and https:// URLs passed to WebviewComm.constructAddress instead of prefixing them with the Live Preview host.
  • Ensure workspace-relative preview paths include a leading / when the workspace root already ends with a path separator.
  • Add regression coverage for both malformed URL cases.

Fixes #840.

Verification

  • npm run compile
  • git diff --check

Note

npm test -- --grep "leading slash|absolute URLs" currently fails before Mocha starts in my Windows environment because the downloaded VS Code test archive rejects the CLI flags passed by the test runner, for example --disable-extensions, --extensionTestsPath, and --extensionDevelopmentPath.

@dknn

dknn commented Jun 17, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@dknn dknn marked this pull request as ready for review June 17, 2026 22:00
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.

Live Preview can generate malformed URLs for absolute links and workspace paths

1 participant