Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fczuardi opened this issue Feb 14, 2016 · 1 comment
Open

Comments

@fczuardi
Copy link

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:

  • Create a new post
  • Paste the embed code of an instagram photo
  • Insert some text after the embed code
  • Publish it

Expected behavior

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.

fczuardi added a commit to fczuardi/nodebb-plugin-blog-comments that referenced this issue Feb 14, 2016
@theunknownartisthour
Copy link
Contributor

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.

theunknownartisthour added a commit to theunknownartisthour/nodebb-plugin-blog-comments that referenced this issue Mar 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants