Embedded posts from Ghost are stripped of HTML

Hello,

I was not able to find a topic on this particular issue in the search so I hope it is okay.

First, I have successfully connected Discourse comments to my blog following directions here. The comment box shows up on blog posts and generates a topic on Discourse automatically. :white_check_mark:

The issue, however, is that when you expand the embedded post in the Discourse thread like this:

The post is completely stripped of images and rich text. No images, no h1 or h2 tags, no links. It just shows up as plain text and it’s also missing the headlines completely.

My Discourse theme is default and Ghost theme is Casper.

Does anyone have any ideas as to what the problem could be?

Thank you.

When you click the “Show Full Post” button for an embedded post, Discourse attempts to retrieve the post’s content from its URL. That content is then cached for a period of 10 minutes. Depending on the embedded post’s markup, sometimes Discourse has trouble retrieving the post’s content. This can be fixed by configuring the “CSS selector” setting that’s found in the Crawler Settings section of your Admin / Customize / Embedding page. More details about this are here: How to configure the allowed embed selectors setting.

For your case, I’m unsure why images and heading tags are being excluded and paragraph text is being included. Possibly you’ve already added some selectors to this setting and those selectors are excluding heading and image tags.

1 Like