carpentries / workbench

Repository for Discussions and Materials about The Carpentries Workbench
https://carpentries.github.io/workbench/
Creative Commons Attribution 4.0 International
17 stars 7 forks source link

& appears as & in next/previous episode links #71

Closed tobyhodges closed 11 months ago

tobyhodges commented 1 year ago

Ampersands are not displayed correctly in the navigation links to next/previous episode pages, appearing instead as "\&". See https://librarycarpentry.org/lc-sql/04-ordering-commenting.html for an example, where the link to the next episode appears as "Aggregating \&..."

screengrab of the relevant part of the example episode page linked in the issue description

zkamvar commented 1 year ago

Thank you for opening this. It is definitely a bug. I'll see what I can do.

zkamvar commented 11 months ago

I was going through old issues and I realize this is a bug from {varnish}, not {sandpaper}. Specifically, this is caused by the Mustache templating escaping values.

So any place that contains {{forward_title}} or {{back_title}} needs to be changed to either include an ampersand or triple curlies (see https://mustache.github.io/mustache.5.html)

froggleston commented 11 months ago

Thanks for raising this @tobyhodges ! @zkamvar and I went through this today and I've added the triple curly braces fix (e.g. {{{forward_title}}}) to not escape characters in the navigation titles. This fix will be in the upcoming varnish 0.3.2 release.

zkamvar commented 11 months ago

Just a note, Rob created the release 20 minutes ago and it is now live on the R universe: https://carpentries.r-universe.dev/varnish