Skip to content

Commit

Permalink
Merge pull request #101 from carpentries/frog-title-escape-98
Browse files Browse the repository at this point in the history
Fix nav titles to not HTML escape
  • Loading branch information
froggleston authored Nov 8, 2023
2 parents 527a337 + 1e57958 commit 0be4a7c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Authors@R: c(
family = "Davey",
role = c("ctb"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-5589-7754")),
comment = c(ORCID = "0000-0002-5589-7754")),
person()
)
Description: This package does nothing but contain template HTML CSS and JS files.
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
setting the background-color to #FFFFFF (reported: @sarahmbrown,
https://github.com/carpentries/workbench/issues/76 (#99); fixed
@froggleston, #100)
* Back and forward navigation titles have been fixed to keep raw content and
not escape characters (reported: @tobyhodges,
https://github.com/carpentries/workbench/issues/71 (#98); fixed
@froggleston, #101)

# varnish 0.3.1

Expand Down
8 changes: 4 additions & 4 deletions inst/pkgdown/templates/content-chapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
{{#page_back}}
<a class="chapter-link" href="{{#site}}{{root}}{{/site}}{{page_back}}" rel="prev">
<i aria-hidden="true" class="small-arrow" data-feather="arrow-left"></i>
{{#back_title}}Previous: {{back_title}}{{/back_title}}{{^back_title}}Home{{/back_title}}
{{#back_title}}Previous: {{{back_title}}}{{/back_title}}{{^back_title}}Home{{/back_title}}
</a>
{{/page_back}}
{{#page_forward}}
<a class="chapter-link float-end" href="{{#site}}{{root}}{{/site}}{{page_forward}}" rel="next">
{{#forward_title}}Next: {{forward_title}}... {{/forward_title}}{{^forward_title}}Home{{/forward_title}}
{{#forward_title}}Next: {{{forward_title}}}... {{/forward_title}}{{^forward_title}}Home{{/forward_title}}
<i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i>
</a>
{{/page_forward}}
Expand Down Expand Up @@ -68,12 +68,12 @@ <h1>{{& pagetitle}}</h1>
{{#page_back}}
<a class="chapter-link" href="{{#site}}{{root}}{{/site}}{{page_back}}" rel="prev">
<i aria-hidden="true" class="small-arrow" data-feather="arrow-left"></i>
{{#back_title}}Previous: {{back_title}}{{/back_title}}{{^back_title}}Home{{/back_title}}
{{#back_title}}Previous: {{{back_title}}}{{/back_title}}{{^back_title}}Home{{/back_title}}
</a>
{{/page_back}}
{{#page_forward}}
<a class="chapter-link float-end" href="{{#site}}{{root}}{{/site}}{{page_forward}}" rel="next">
{{#forward_title}}Next: {{forward_title}}... {{/forward_title}}{{^forward_title}}Home{{/forward_title}}
{{#forward_title}}Next: {{{forward_title}}}... {{/forward_title}}{{^forward_title}}Home{{/forward_title}}
<i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i>
</a>
{{/page_forward}}
Expand Down
4 changes: 2 additions & 2 deletions inst/pkgdown/templates/content-syllabus.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<!-- content for large screens -->
<div class="d-none d-sm-none d-md-block">
{{#page_forward}}
<a class="chapter-link float-end" href="{{#site}}{{root}}{{/site}}{{page_forward}}" rel="next">Next{{#forward_title}}: {{forward_title}}{{/forward_title}}... <i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i></a>
<a class="chapter-link float-end" href="{{#site}}{{root}}{{/site}}{{page_forward}}" rel="next">Next{{#forward_title}}: {{{forward_title}}}{{/forward_title}}... <i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i></a>
{{/page_forward}}
</div>
<hr/>
Expand Down Expand Up @@ -50,7 +50,7 @@ <h1 class="schedule-heading">{{{pagetitle}}}</h1>
<!-- content for large screens -->
<div class="d-none d-sm-none d-md-block">
{{#page_forward}}
<a class="chapter-link float-end" href="{{#site}}{{root}}{{/site}}{{page_forward}}" rel="next">Next{{#forward_title}}: {{forward_title}}{{/forward_title}}... <i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i></a>
<a class="chapter-link float-end" href="{{#site}}{{root}}{{/site}}{{page_forward}}" rel="next">Next{{#forward_title}}: {{{forward_title}}}{{/forward_title}}... <i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i></a>
{{/page_forward}}
</div>
</nav>
Expand Down

0 comments on commit 0be4a7c

Please sign in to comment.