Skip to content

Commit 5d6c846

Browse files
authored
Merge pull request #11711 from quarto-dev/bugfix/issue-11701
wrap HTML emitted by EJS templates in `{=html}` rawblocks
2 parents 241155a + 38e445d commit 5d6c846

File tree

6 files changed

+13
-3
lines changed

6 files changed

+13
-3
lines changed

news/changelog-1.7.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ All changes included in 1.7:
1111

1212
- ([#11654](https://github.com/quarto-dev/quarto-cli/issues/11654)): Allow `page-inset` as value in `column` key for code cells.
1313

14-
## Book Project
14+
## Website projects
15+
16+
- ([#11701](https://github.com/quarto-dev/quarto-cli/issues/11701)): Wrap HTML emitted by EJS templates in `{=html}` blocks to avoid memory blowup issues with Pandoc's parser.
17+
18+
## Book projects
1519

1620
- ([#11520](https://github.com/quarto-dev/quarto-cli/issues/11520)): Book's cover image now escapes lightbox treatment, which was incorrectly applied to it when `lightbox: true` was set in the book's configuration.
1721

src/resources/projects/website/listing/item-default.ejs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ print(`<div class="metadata-value listing-${field}">${listing.utilities.outputLi
6565
<% } %>
6666
</div>
6767
<div class="metadata"><a href="<%- item.path %>" class="no-external">
68-
<% if (fields.includes('date') && item.date) { %><div class="listing-date">`<%= item.date %>`{=html}</div><% } %>
68+
<% if (fields.includes('date') && item.date) { %><div class="listing-date"><%= item.date %></div><% } %>
6969
<% if (fields.includes('author') && item.author) { %><div class="listing-author"><%= item.author %></div><% } %>
7070
<% if (fields.includes('reading-time') && item['reading-time']) { %> <div class="listing-reading-time"><%= item['reading-time'] %></div> <% } %>
7171
<% for (const field of otherFields) { %>

src/resources/projects/website/listing/item-grid.ejs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const flexJustify = showField('author') && showField('date') ? "justify" : showF
7979
<% if (showField('author') || showField('date')) { %>
8080
<div class="card-attribution card-text-small <%-flexJustify%>">
8181
<% if (showField('author')) { %><div class="listing-author"><%= item.author %></div><% } %>
82-
<% if (showField('date')) { %><div class="listing-date">`<%= item.date %>`{=html}</div><% } %>
82+
<% if (showField('date')) { %><div class="listing-date"><%= item.date %></div><% } %>
8383
</div>
8484
<% } %>
8585

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
:::{.list .quarto-listing-default}
2+
``````{=html}
23
<% for (const item of items) { %>
34
<% partial('item-default.ejs.md', {listing, item, utils }) %>
45
<% } %>
6+
``````
57
:::

src/resources/projects/website/listing/listing-grid.ejs.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ const cols = listing['grid-columns'];
33
%>
44

55
:::{.list .grid .quarto-listing-cols-<%=cols%>}
6+
```{=html}
67
<% for (const item of items) { %>
78
<% partial('item-grid.ejs.md', {listing, item, utils }) %>
89
<% } %>
10+
```
911
:::

src/resources/projects/website/listing/listing-table.ejs.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ return listing.utilities.outputLink(item, field, value, `listing-${field}`);
6464
}
6565
%>
6666

67+
```{=html}
6768
<table class="quarto-listing-table table<%- stripedCls %><%- hoverCls %>">
6869
<thead>
6970
<tr>
@@ -90,3 +91,4 @@ return listing.utilities.outputLink(item, field, value, `listing-${field}`);
9091
<% } %>
9192
</tbody>
9293
</table>
94+
```

0 commit comments

Comments
 (0)