quarto-dev / quarto-dev/quarto

VS Code Preview not working if path contains special characters

Open
#1,102 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug vscode
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
  1. Create a folder with special characters, e.g., mkdir "name;with@symbols".
  2. Open this folder in VS Code (File → Open Folder) and create a .qmd file. The content doesn't matter, here's a minimal document:
---
title: "Untitled"
format: html
---

Test.
  1. Save the .qmd and 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

  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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.