quarto-dev / quarto-dev/quarto-cli

`background-image` with file path using `\` seems to be broken in HTML when published to gh-pages

Open
#13,428 4 comments 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since Sep 26, 2025.

bug publishing revealjs upstream
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Check what revealjs is doing as this works

## {background-image="images/whr-ipynb-report-1.gif" background-size="contain" background-repeat="no-repeat"}

but not this one using \

## {background-image="images\whr-ipynb-report-1.gif" background-size="contain" background-repeat="no-repeat"}

leads to this error in browser console after quarto publish gh-pages

images%5Cwhr-ipynb-report-1.gif:1  Failed to load resource: the server responded with a status of 404 ()

%5C is not expecting so there is some escaping happening.

quarto preview locally works 🤔

So could we catch that, or prevent this - it seems to be in revealjs own processing

Maybe catch attributes in Lua and

  • check for existence
  • then normalize path ?

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.