<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Wed, 10 Jun 2026 05:10:24 +0000</lastBuildDate>
    <item>
      <title>(Other) --Snipplr-- Workaround: Code in Comments - wizard04</title>
      <link>https://snipplr.com/view/22799/snipplr-workaround-code-in-comments</link>
      <description>&lt;p&gt;For some reason, Snipplr has decided not to HTML-encode &lt;code&gt;&amp;lt;&lt;/code&gt; and &lt;code&gt;&amp;gt;&lt;/code&gt; signs (i.e., replacing them with `&amp;lt;` and `&amp;gt;`) that a user inputs into a comment box, and instead strips anything that looks like a tag from the comment entirely.&#13;
&#13;
So, if you enter something like &lt;code&gt;&amp;#96;&amp;lt;div&amp;gt;test&amp;lt;/div&amp;gt;&amp;#96;&lt;/code&gt; in the comment box, you would expect to see &lt;code&gt;&amp;lt;div&amp;gt;test&amp;lt;/div&amp;gt;&lt;/code&gt; in the post but you would actually end up with `test`.&#13;
&#13;
The exceptions that I've found are `&lt;b&gt;`, `&lt;i&gt;`, `&lt;em&gt;`, `&lt;strong&gt;`, and `&lt;code&gt;` tags.&#13;
&#13;
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 &lt;code&gt;&amp;lt;code&amp;gt;&amp;amp;lt;div&amp;amp;gt;test&amp;amp;lt;/div&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;/code&gt; will give the expected result &lt;code&gt;&amp;lt;div&amp;gt;test&amp;lt;/div&amp;gt;&lt;/code&gt;.&#13;
&#13;
Note that you will also have to replace the back-ticks with `&amp;#96;`&#13;
&#13;
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: `&lt;div&gt;test&lt;/div&gt;`).&lt;/p&gt;</description>
      <pubDate>Mon, 09 Nov 2009 11:57:52 UTC</pubDate>
      <guid>https://snipplr.com/view/22799/snipplr-workaround-code-in-comments</guid>
    </item>
  </channel>
</rss>
