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
.qmd file. The content doesn't matter, here's a minimal document:
---
title: "Untitled"
format: html
---
Test.
- 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
Bug description
If the path to the
.qmdcontains special character, e.g.,~/temp/name;with@symbols, Quarto Preview does not work because it doesn't escape the characters.Steps to reproduce
mkdir "name;with@symbols"..qmdfile. The content doesn't matter, here's a minimal document:.qmdand run "Quarto: Preview"Actual behavior
I get an error because the special characters are not escaped:
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.
Your environment