Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listing page categories are not working properly if spaces or non ascii chracters #11752

Closed
mcanouil opened this issue Dec 29, 2024 · 2 comments · Fixed by #11771
Closed

Listing page categories are not working properly if spaces or non ascii chracters #11752

mcanouil opened this issue Dec 29, 2024 · 2 comments · Fixed by #11771
Assignees
Labels
bug Something isn't working listings regression Functionality that used to work but now is broken.
Milestone

Comments

@mcanouil
Copy link
Collaborator

mcanouil commented Dec 29, 2024

Bug description

With a category such as "news with code" or "🎬", the link to filter on category works as expected inside the blog post but does not on the main listing page in the post description (the "category side bar" filters properly).

Screen.Recording.2024-12-29.at.20.52.08.mov

Short version:

Screen.Recording.2024-12-29.at.20.53.19.mov

Steps to reproduce

quarto create project website issueXXXXX issueXXXXX
sed -i '' 's/news/"new with code"/' posts/post-with-code/index.qmd 

Expected behavior

The category link on the listing main page description should filter properly as the link on the "category side bar" and in the document itself.

Actual behavior

Category link in description does lead to match.

Your environment

MacOS latest

Quarto check output

Quarto 99.9.9
[✓] Checking environment information...
      Quarto cache location: /Users/mcanouil/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 99.9.9
      commit: 91030114b721b67f49dc59284688c262efd8ee83
      Path: /Users/mcanouil/Projects/quarto/quarto-cli/package/dist/bin

[✓] Checking tools....................OK
      TinyTeX: v2024.11
      Chromium: (not installed)

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

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

[✓] Checking Python 3 installation....OK
      Version: 3.13.1
      Path: /Users/mcanouil/Projects/quarto/quarto-playground/.venv/bin/python3
      Jupyter: 5.7.2
      Kernels: julia-1.11, python3

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

(|) Checking R installation...........ℹ R version 4.4.2 (2024-10-31)
! Config '~/.Rprofile' was loaded!
[✓] Checking R installation...........OK
      Version: 4.4.2
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
      knitr: 1.46
      rmarkdown: 2.26

[✓] Checking Knitr engine render......OK
@mcanouil mcanouil added bug Something isn't working listings labels Dec 29, 2024
@mcanouil mcanouil changed the title Listing page categories are not working properly if spaces in category name Listing page categories are not working properly if spaces or non ascii chracters Dec 29, 2024
@cderv
Copy link
Collaborator

cderv commented Dec 31, 2024

this looks similar to what I tried to fix in

So maybe this will be fixed when #11760 solves the HTML raw block problem or I missed something in #11397 🤔

@cderv cderv self-assigned this Dec 31, 2024
@cderv
Copy link
Collaborator

cderv commented Dec 31, 2024

Yes I missed a decoding in one place

window.quartoListingCategory = (category) => {
category = atob(category);
if (categoriesLoaded) {
activateCategory(category);
setCategoryHash(category);
}
};

This is why it is not working when clicking. I'll fix this and add a test.

@cderv cderv added the regression Functionality that used to work but now is broken. label Jan 3, 2025
@cderv cderv added this to the Hot-fix milestone Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working listings regression Functionality that used to work but now is broken.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants