quarto-dev / quarto-dev/quarto-cli

Calibre "Check ePub" fails when section titles and BibTex identifiers with non-ASCII characters generate XHTML identifiers with non-ASCII characters

Open
#14,205 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I have:
  • searched the issue tracker for similar issues
  • installed the latest version of Quarto CLI
  • formatted my issue following the Bug Reports guide
Bug description

If one uses non-ASCII characters in a string that Quarto uses for an XHTML identifier, the presence of non-ASCII characters in the XHTML identifier will cause the Calibre "Check ePub" to generate a warning against doing so.

A simple fix for this could involve Quarto (or Pandoc) replacing non-ASCII characters in XHTML identifiers with similar ASCII characters (e.g. stripping out extended Latin diacritics) or perhaps ASCII representations of the non-ASCII characters where there is not a simple replacement.

Steps to reproduce

If, e.g., one uses a BibTex citation like:

@article{buñuel_1994,
    author = {Bu\~{n}uel Heras, Ana},
    title = {La Construcci\'{o}n Social Del Cuerpo de La Mujer En El Deporte},
    year = {1994},
    journal = {REIS: Revista Espa\~{n}ola de Investigaciones Sociol\'{o}gicas},
    number = {68},
    pages = {97--117}
}
@buñuel_1994

Calibre "Check ePub" will generate the following warning:

The id ref-buñuel_1994 is not a valid id. IDs must start with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). This is to ensure maximum compatibility with a wide range of devices.

Similarly, a heading like:

## Physical Education and La Acadèmia d'Educació Física de Catalunya

Will generate the following XHTML:

<section id="physical-education-and-la-acadèmia-deducació-física-de-catalunya" class="level2">
<h2>Physical Education and La Acadèmia d’Educació Física de Catalunya</h2>

And Calibre "Check ePub" will generate the following warning:

The id physical-education-and-la-acadèmia-deducació-física-de-catalunya is not a valid id. IDs must start with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). This is to ensure maximum compatibility with a wide range of devices.

Actual behavior

Non-ASCII characters appear in XHTML identifiers, leading to compatibility warnings for each instance.

Expected behavior

XHTML identifiers should use only the character set expected by the compatibility checker.

Your environment
Quarto check output
$ quarto check
Quarto 1.8.27
[✓] Checking environment information...
      Quarto cache location: /home/vscode/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.6.3: OK
      Dart Sass version 1.87.0: OK
      Deno version 2.3.1: OK
      Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.8.27
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2026.03.02
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /home/vscode/.TinyTeX/bin/x86_64-linux
      Version: 2026

[✓] Checking Chrome Headless....................OK
      Using: Chrome found on system
      Path: /usr/bin/google-chrome
      Source: PATH

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.13.9
      Path: /usr/local/python/current/bin/python3
      Jupyter: 5.9.1
      Kernels: julia-1.12, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.5.2
      Path: /opt/R/4.5.2/lib/R
      LibPaths:
        - /home/vscode/R/x86_64-pc-linux-gnu-library/4.5
        - /opt/R/4.5.2/lib/R/library
      knitr: 1.51
      rmarkdown: 2.30

[✓] Checking Knitr engine render......OK

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 with the Quarto CLI rendering path and its Pandoc/XHTML identifier handling; the issue does not name a file or test, so first reproduce the citation and heading examples and trace where the IDs are generated. Done means generated XHTML IDs use only the compatibility checker’s allowed ASCII characters, with coverage for both examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.