Skip to content

project title with markup left uncleaned when page lacks title #7754

@aronatkins

Description

@aronatkins

Bug description

Given a project configuration like:

project:
  type: website

website:
  title: 'user <small>{{< env USER >}}</small>'

and two Quarto files, one with and one without a title:

---
---

this is home.
---
title: about
---

this is about.

When rendered, the page WITHOUT a title receives a <title> element that contains the liberal markup and shortcode.

<title>user &lt;small&gt;aron&lt;/small&gt;</title>

In contrast, the page WITH a title receives a cleaned-up <title> element.

<title>user aron - about</title>

Steps to reproduce

Render the files provided in the description.

Expected behavior

Both example pages should be given "cleaned" <title> elements.

Actual behavior

The page without a title has markup in the <title>.

Your environment

Using quarto-1.4.514
macOS Sonoma 14.1.1 (23B81)

Quarto check output

Quarto 1.4.514
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.9: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.514
      Path: /Users/aron/Downloads/quarto-1.4.514/bin

[✓] Checking tools....................OK
      TinyTeX: (external install)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/aron/Library/TinyTeX/bin/universal-darwin
      Version: 2022

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

[✓] Checking Python 3 installation....OK
      Version: 3.9.6
      Path: /Library/Developer/CommandLineTools/usr/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.3.1
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library
      knitr: 1.44
      rmarkdown: 2.25

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriaged-toIssues that were not self-assigned, signals that an issue was assigned to someone.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions