The output from your first code example looks close to what I was expecting. I think the problem with it is that you need to add https://www.youtube.com/embed
to your Discourse allowed iframes
site setting. That will allow the iframe
that is in the post’s markup to display as a video player on Discourse.
3 Likes