File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
middleware/contextualizers Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ async function getBreadcrumbs(req) {
39
39
}
40
40
41
41
async function getShortTitle ( page , context ) {
42
+ // Note! Don't use `page.title` or `page.shortTitle` because if they get
43
+ // set during rendering, they become the HTML entities encoded string.
44
+ // E.g. "Delete & restore a package"
45
+
42
46
if ( page . rawShortTitle ) {
43
47
if ( page . rawShortTitle . includes ( '{' ) ) {
44
48
// Can't easily cache this because the `page` is reused for multiple
@@ -47,10 +51,10 @@ async function getShortTitle(page, context) {
47
51
// this point it's probably not worth it.
48
52
return await liquid . parseAndRender ( page . rawShortTitle , context )
49
53
}
50
- return page . shortTitle
54
+ return page . rawShortTitle
51
55
}
52
56
if ( page . rawTitle . includes ( '{' ) ) {
53
57
return await liquid . parseAndRender ( page . rawTitle , context )
54
58
}
55
- return page . title
59
+ return page . rawTitle
56
60
}
You can’t perform that action at this time.
0 commit comments