quarto-dev / quarto-dev/quarto
VS Code Preview not working if path contains special characters
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 645
- Forks
- 62
- Avg merge
- 17h 42m
- Merged PRs (30d)
- 13
Description
Bug description
If the path to the .qmd contains special character, e.g., ~/temp/name;with@symbols, Quarto Preview does not work because it doesn't escape the characters.
Steps to reproduce
- Create a folder with special characters, e.g.,
mkdir "name;with@symbols". - Open this folder in VS Code (File → Open Folder) and create a
.qmdfile. The content doesn't matter, here's a minimal document:
---
title: "Untitled"
format: html
---
Test.
- Save the
.qmdand run "Quarto: Preview"
Actual behavior
I get an error because the special characters are not escaped:
~/temp/name;with@symbols ❯ quarto preview /Users/clemens/temp/name;with@symbols/Untitled-1.qmd --no-browser --no-watch-inputs
ERROR: /Users/clemens/temp/name not found
Expected behavior
The preview should render successfully even if the path contains special characters. The solution is pretty straightforward, just escape special characters, or even easier, enclose the path argument in double quotes.
~/temp/name;with@symbols ❯ quarto preview "/Users/clemens/temp/name;with@symbols/Untitled-1.qmd" --no-browser --no-watch-inputs
Your environment
- IDE: VSCode
- OS: macOS Tahoe 26.6.2
- Quarto version: 1.10.18
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the VS Code “Quarto: Preview” command and trace how the .qmd path becomes the quarto preview process argument. Reproduce with a folder such as name;with@symbols, then verify the path is passed as one argument and the preview renders successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100