psychobunny / nodebb-plugin-blog-comments

Lets NodeBB act as a comments engine/widget for your blog
BSD 2-Clause "Simplified" License
99 stars 55 forks source link

Ghost installation example breaks posts with </script> closing tags #44

Open fczuardi opened 8 years ago

fczuardi commented 8 years ago

On the readme file installation instructions the code contains this:

<script id="nbb-markdown" type="text/markdown">{{{../post.markdown}}}</script>

But on posts that have external embeds such as twitter tweet embeds, github code embeds, instagram embeds and possible others, the code from the post breaks the page rendering because the script tag will be closed sooner that was suppose to, causing a HTML dump after the commenting box.

Steps to reproduce:

The blog post content is displayed once and then the comment box.

Actual behavior

The blog post content is displayed once then the comment box, then a markdown dump of everything after the closing script tag is presented in the page.

theunknownartisthour commented 8 years ago

The code appears to only target the id, I think the script tag was just the shortest way of making sure the content inside didn't appear. You can use another element and hide it specifically with css. Although good point it's probably a good idea if the markdown content should be embedded another way.