Skip to content

Fix callout title option rendered as HTML title attribute - #15051

Merged
cderv merged 2 commits into
mainfrom
fix/callout-title-attribute-leak
Oct 14, 2026
Merged

cderv merged 2 commits into
mainfrom
fix/callout-title-attribute-leak

Conversation

@cderv

@cderv cderv commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

While working on #15041, I noticed that a callout's title option also ends up as an HTML title attribute: on the .callout div in html, and on the wrapper div in revealjs and epub. Browsers show it as a tooltip over the whole callout, repeating the heading already displayed.

Root cause

The callout parser in src/resources/filters/customnodes/callout.lua reads title but does not remove it from the div attributes, unlike appearance, collapse and icon next to it. So it gets copied with the other leftover attributes. This is there since the title attribute was first supported in 1.3.

Fix

title is now removed once read. Other leftover attributes like data-* still pass through.

In revealjs and epub, a callout with an id and a title no longer gets a wrapper div, as no leftover attributes remain. It renders as a single div, like an untitled callout with an id since #15041.

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes
  • updated the appropriate changelog in the PR
  • ensured the present test suite passes
  • added new tests
  • created a separate documentation PR in Quarto's website repo and linked it to this PR
AI-assisted PR
  • AI tool used: Claude Code
  • Codebase grounding: local clone, DeepWiki MCP
  • Human review: I have reviewed, tested, and verified the AI-generated content before submitting.

Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.

cderv added 2 commits October 14, 2026 13:03
A callout written with title="..." rendered that text as an HTML title
attribute: on the .callout div in HTML output and on the wrapper div in
revealjs and EPUB. Browsers show it as a tooltip over the whole callout,
repeating the heading.

The callout parser read the title option without removing it from the
div attributes, unlike appearance, collapse and icon next to it, so it
was copied with the other leftover attributes. This dates back to when
the title attribute was first supported (v1.3).

The title is now removed once read. As a side effect, a revealjs or EPUB
callout with only an id and a title no longer gets a wrapper div, since
no leftover attributes remain. Other attributes such as data-* are still
passed through.
@posit-snyk-bot

posit-snyk-bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv
cderv merged commit ad6e357 into main Oct 14, 2026
51 checks passed
@cderv
cderv deleted the fix/callout-title-attribute-leak branch October 14, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants