I’m in the final stages of our forum configuration, and I’m really stoked with the inclusion of the ‘Show Full Post’ button that @eviltrout put together. It means I can put a small summary of the post directly in the forum, while also allowing people to pull in the entire post. It really is the best of both worlds. I’m sure anyone who is using Discourse and a blog in tandem feels the same way.
The only part that I cannot find a way around is content images that are nested in a
<div>. Let me explain.
On our Wordpress blog, there are two types of images in posts: standard images, and ‘borderless’ images which are super-wide and break out of the column of the content section.
Standard images are simple img tags, like
<img src="#" />, but borderless images are created by nesting the image in a div, like:
<img src="#" />
When you hit the ‘Show Full Post’ button in Discourse, standard images are pulled into the topic just fine. However, if an image is ‘borderless’ (ie, nested in a div), it is ignored.
I’ve tried adding various combinations to the CSS selector whitelist to no avail.
Currently, I have
section.post-content as my whitelist selector, and if I change that to:
section.post-content>div>img, I can embed the image (only the image) successfully.
However, as soon as I start using those two at the same time, (for example:
section.post-content, section.post-content>div>img) it goes back to ignoring the nested image.
Any advice on how I can configure the embedder/whitelist to work with this scenario?