Skip to content

Commit 1fd644a

Browse files
authored
Merge pull request #11771 from quarto-dev/listings/special-chars
2 parents 90d69cc + 4dc0353 commit 1fd644a

File tree

21 files changed

+171
-58
lines changed

21 files changed

+171
-58
lines changed

news/changelog-1.7.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ All changes included in 1.7:
66
- ([#11532](https://github.com/quarto-dev/quarto-cli/issues/11532)): Fix regression for [#660](https://github.com/quarto-dev/quarto-cli/issues/660), which causes files to have incorrect permissions when Quarto is installed in a location not writable by the current user.
77
- ([#11549](https://github.com/quarto-dev/quarto-cli/issues/11549)): Fix regression in rendering `dashboard` tabsets into cards without titles.
88
- ([#11580](https://github.com/quarto-dev/quarto-cli/issues/11580)): Fix regression with documents containing `categories` fields that are not strings.
9+
- ([#11752](https://github.com/quarto-dev/quarto-cli/issues/11752)): Fix regression with non-alphanumeric characters in `categories` preventing correct filtering of listing.
910

1011
## YAML validation
1112

src/resources/projects/website/listing/quarto-listing.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ const kProgressiveAttr = "data-src";
22
let categoriesLoaded = false;
33

44
window.quartoListingCategory = (category) => {
5-
category = atob(category);
5+
// category is URI encoded in EJS template for UTF-8 support
6+
category = decodeURIComponent(atob(category));
67
if (categoriesLoaded) {
78
activateCategory(category);
89
setCategoryHash(category);

tests/docs/playwright/blog/simple-blog/_quarto.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,15 @@ project:
33

44
website:
55
title: "Testing listing search"
6+
navbar:
7+
left:
8+
- href: index.qmd
9+
text: Home
10+
- href: default.qmd
11+
text: Default
12+
- href: grid.qmd
13+
text: Grid
14+
- href: table.qmd
15+
text: Table
616

717
format: html
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: "Testing listing default"
3+
listing:
4+
contents: posts2
5+
sort: "date desc"
6+
type: default
7+
categories: true
8+
filter-ui: true
9+
page-layout: full
10+
title-block-banner: true
11+
---
12+
13+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: "Testing listing grid"
3+
listing:
4+
contents: posts3
5+
sort: "date desc"
6+
type: grid
7+
categories: true
8+
filter-ui: true
9+
page-layout: full
10+
title-block-banner: true
11+
---
12+
13+
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
---
2-
title: "Testing listing search"
3-
listing:
4-
contents: posts
5-
sort: "date desc"
6-
type: table
7-
categories: true
8-
filter-ui: true
9-
page-layout: full
10-
title-block-banner: true
2+
title: "Testing listings"
113
---
124

5+
This website is for testing listings
136

-20.9 KB
Loading
-18.2 KB
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# options specified here will apply to all posts in this folder
2+
3+
# Enable banner style title blocks
4+
title-block-banner: true
19.8 KB
Loading

0 commit comments

Comments
 (0)