Skip to content

Instantly share code, notes, and snippets.

@chriscoyier
Created December 3, 2014 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriscoyier/215aee9a06435b3bec8f to your computer and use it in GitHub Desktop.
Save chriscoyier/215aee9a06435b3bec8f to your computer and use it in GitHub Desktop.
Example Markdown Comment

This is a sample sentence to test Markdown in the comments of a WordPress blog with Jetpack Markdown enabled for comments.

<h1 id="test">This is a code block</h1>

<head>
  <script>alert("Anything goes in here");</script>
  <meta>because it just should just be escaped anyway</meta>
</head>

<?php echo "hopefully WordPress doesn't strip anything"; ?>

<span>Even for anon/low-privileged users (non admins)</span>

Hopefully this fenced code block comes out wrapped in <pre> and <code> tags.

Single-backticked <code> should allow anything also, since it escapes, like this <script>alert("hi");</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment