0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Merge branch 'main' into reset-mail-receiver

This commit is contained in:
Ronald Langeveld 2023-01-30 21:47:02 +08:00 committed by GitHub
commit 33f6a3820c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -743,5 +743,19 @@ describe('Batch sending tests', function () {
});
});
describe('HTML-content', function () {
it('Does not HTML escape feature_image_caption', async function () {
const {html, plaintext} = await sendEmail({
feature_image: 'https://example.com/image.jpg',
feature_image_caption: 'Testing <b>feature image caption</b>'
});
// Check html contains text without escaping
assert.match(html, /Testing <b>feature image caption<\/b>/);
// Check plaintext version dropped the bold tag
assert.match(plaintext, /Testing feature image caption/);
});
});
// TODO: Replacement fallbacks
});

View file

@ -105,7 +105,7 @@
</tr>
{{#if post.feature_image_caption }}
<tr>
<td class="feature-image-caption" align="center">{{post.feature_image_caption}}</td>
<td class="feature-image-caption" align="center">{{{post.feature_image_caption}}}</td>
</tr>
{{/if}}
{{/if}}