Listing category filter and URL hash disagree after Back, or with `&`, `=` or `%` in a category
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 72/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- javascript
- Bereich
- frontend
Rechercherichtung
Beginne mit quarto-listing.js, insbesondere mit applyListingHash, makeHash und parseHash, und reproduziere dann die drei Fälle in einem gerenderten Listing mit den bereitgestellten Kategorienamen. Prüfe, wie Zurück zur unveränderten URL den Filter zurücksetzt und wie codierte Kategorienamen Neuladevorgänge überstehen. Fertig ist die Aufgabe, wenn bei der unveränderten URL alle Einträge ohne ausgewählte Kategorie erscheinen und jede Kategorie mit Sonderzeichen ihren passenden Eintrag auswählt und anzeigt, ohne einen Konsolenfehler zu verursachen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
The category filter of a listing can disagree with the #category= hash in the URL.
applyListingHash in quarto-listing.js returns early when there is no hash, and it only filters when the category is not empty, so Back to the bare URL or to #category= never shows all items again.
Category names with &, = or % break after a reload or a shared link.
makeHash writes the name without encoding, parseHash splits on & and =, and the value is decoded twice: once in parseHash and again in applyListingHash.
So R&D is read as R, and 100% throws URIError: URI malformed in window["quarto-listing-loaded"], before pagination and progressive images are wired.
With #15339, item category tags become links, so a Ctrl or middle click on a tag opens such a URL in a new tab.
Related: #11752, #10829, #15339.
Steps to reproduce
_quarto.yml:
project:
type: website
website:
title: "Listing"
index.qmd:
---
title: "Posts"
listing:
contents: posts
categories: true
---
posts/one.qmd:
---
title: "Post one"
date: 2026-01-01
categories: [alpha, "R&D"]
---
Text.
posts/two.qmd:
---
title: "Post two"
date: 2026-01-02
categories: [beta, "100%"]
---
Text.
Render the website and open _site/index.html.
- Click "alpha" in the categories filter, then press Back.
- Click "R&D", then reload the page.
- Click "100%", then reload the page.
Actual behavior
- The URL has no hash, but the listing still shows one item and "alpha" is still active.
- The URL is
#category=R&D, the listing shows no items, and no entry is active. - The URL is
#category=100%, the console showsURIError: URI malformed, both items show, and no entry is active.
Expected behavior
- Back to the bare URL shows all items, with no category active ("All" is active in the numbered style).
- After a reload, the listing shows the one "R&D" item, and "R&D" is active.
- After a reload, the listing shows the one "100%" item, "100%" is active, and the console has no error.
Your environment
- Quarto built from
main(ac310a424). The listing script ismain'squarto-listing.js. - Browser: Brave (Chromium) on macOS 27.2.
Quarto check output
Quarto 99.9.9
[✓] Checking environment information...
Quarto cache location: /Users/mcanouil/Library/Caches/quarto
Project: none found (single-file mode)
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.10.0: OK
Dart Sass version 1.107.1: OK
Deno version 2.9.8: OK
Typst version 0.15.1: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
Path: /Users/mcanouil/Projects/quarto-dev/quarto-cli/package/dist/bin
[✓] Checking basic markdown render....OK
- Vorherrschende Sprache
- JavaScript
- Sterne
- 6.2k
- Forks
- 482
- Ø Merge
- 17 Std. 46 Min.
- Gemergte PRs (30 T.)
- 135
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus quarto-dev/quarto-cli
-
brand bug typst
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
quarto-dev/quarto-cli#15311 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Notebook preview header title takes the heading colour on the primary backgroundEvtl. vergeben @SabyaXSachi hat das vor 5 Tagen übernommen. Offenaccessibility bug embed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
quarto-dev/quarto-cli#15306 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bootstrap bug themes
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
quarto-dev/quarto-cli#15304 ·
Maintainer antworten meist innerhalb von 1 Tag
-
accessibility bug code-blocks html themes
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
quarto-dev/quarto-cli#15303 ·
Maintainer antworten meist innerhalb von 1 Tag
-
accessibility brand bug dark-mode
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
quarto-dev/quarto-cli#15301 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in quarto-dev/quarto-cli
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
0. Needs triage bug feature: api
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
agent-os ai bug good first issue help wanted
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
area: documentation good first issue package: rule-data status: accepting prs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
status: needs triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
mastra-ai/mastra#30109 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag