diff --git a/core/shared/html-to-plaintext.js b/core/shared/html-to-plaintext.js index 7922912a8a..45ff86622b 100644 --- a/core/shared/html-to-plaintext.js +++ b/core/shared/html-to-plaintext.js @@ -48,7 +48,11 @@ const loadConverters = () => { {selector: 'figcaption', format: 'skip'}, // Strip inline and bottom footnotes {selector: 'a[rel=footnote]', format: 'skip'}, - {selector: 'div.footnotes', format: 'skip'} + {selector: 'div.footnotes', format: 'skip'}, + // Don't output hrs + {selector: 'hr', format: 'skip'}, + // Don't output > in blockquotes + {selector: 'blockquote', format: 'block'} ] }); diff --git a/test/e2e-api/content/__snapshots__/pages.test.js.snap b/test/e2e-api/content/__snapshots__/pages.test.js.snap index 36fe0cd62a..29b16778d2 100644 --- a/test/e2e-api/content/__snapshots__/pages.test.js.snap +++ b/test/e2e-api/content/__snapshots__/pages.test.js.snap @@ -81,7 +81,7 @@ Object { An about page is a great example of one you might want to set up early on so people can find out more about you, and what you do. Why should people subscribe to your site and become a member? Details help! -> Tip: If you're reading any post or page on your site and you notice something y", +Tip: If you're reading any post or page on your site and you notice something you", "feature_image": null, "feature_image_alt": null, "feature_image_caption": null, diff --git a/test/unit/shared/html-to-plaintext.test.js b/test/unit/shared/html-to-plaintext.test.js index 54e8aabdc6..60b4c33c54 100644 --- a/test/unit/shared/html-to-plaintext.test.js +++ b/test/unit/shared/html-to-plaintext.test.js @@ -70,4 +70,21 @@ describe('Html to Plaintext', function () { assert.equal(excerpt, expected); }); }); + + describe('Special cases', function () { + it('Instagram (blockquotes)', function () { + // This is an instagram embed, but with all the style attributes & svg content removed for brevity + const html = '
Some text in a paragraph.