For some reason, Snipplr has decided not to HTML-encode < and > signs (i.e., replacing them with < and >) that a user inputs into a comment box, and instead strips anything that looks like a tag from the comment entirely.
So, if you enter something like `<div>test</div>` in the comment box, you would expect to see <div>test</div> in the post but you would actually end up with test.
The exceptions that I've found are <b>, <i>, <em>, <strong>, and <code> tags.
The only reliable way to get around this odd implementation is to use the code tag with its content already HTML-encoded, just like you would if you were writing your own HTML. So entering something like <code><div>test</div></code> will give the expected result <div>test</div>.
Note that you will also have to replace the back-ticks with `
FYI, here is the code I used to create this description itself. The same code is entered in the first comment below (note the difference where the back-ticks are used to surround this: <div>test</div>).
For some reason, Snipplr has decided not to HTML-encode <code><</code> and <code>></code> signs (i.e., replacing them with `<` and `>`) that a user inputs into a comment box, and instead strips anything that looks like a tag from the comment entirely. So, if you enter something like <code>`<div>test</div>`</code> in the comment box, you would expect to see <code><div>test</div></code> in the post but you would actually end up with `test`. The exceptions that I've found are `<b>`, `<i>`, `<em>`, `<strong>`, and `<code>` tags. The only reliable way to get around this odd implementation is to use the code tag with its content already HTML-encoded, just like you would if you were writing your own HTML. So entering something like <code><code>&lt;div&gt;test&lt;/div&gt;</code></code> will give the expected result <code><div>test</div></code>. Note that you will also have to replace the back-ticks with ``` FYI, here is the code I used to create this description itself. The same code is entered in the first comment below (note the difference where the back-ticks are used to surround this: `<div>test</div>`).
Comments
Subscribe to comments
You need to login to post a comment.

For some reason, Snipplr has decided not to HTML-encode
<and>signs (i.e., replacing them with<and>) that a user inputs into a comment box, and instead strips anything that looks like a tag from the comment entirely.So, if you enter something like
`<div>test</div>`in the comment box, you would expect to see<div>test</div>in the post but you would actually end up withtest.The exceptions that I've found are
<b>,<i>,<em>,<strong>, and<code>tags.The only reliable way to get around this odd implementation is to use the code tag with its content already HTML-encoded, just like you would if you were writing your own HTML. So entering something like
<code><div>test</div></code>will give the expected result<div>test</div>.Note that you will also have to replace the back-ticks with
`FYI, here is the code I used to create this description itself. The same code is entered in the first comment below (note the difference where the back-ticks are used to surround this:
test).