microsoft / microsoft/vscode-livepreview

Javascript injected in non-html/javascript files

Open
#702 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
596
Forks
119
Avg merge
1d 4m
Merged PRs (30d)
5

Description

It appears livepreview treating unknown type of files as html. So if server serves json file without .json extension, it corrupts it with <script>..</script>.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the livepreview server's response handling for files whose type is unknown, then reproduce the issue with JSON served without a .json extension. Done means non-HTML and non-JavaScript content is returned unchanged rather than wrapped with script tags.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.