Forum: Redcloth Convert all HTML entities within <pre> tags?

Posted by Jason Garber (Guest)
on 2007-12-19 20:46
(Received via mailing list)
Textile 2.0.0:
bc. This is within a block of code, so < and > should be *entities*.
You can talk about a <p> tag if you wish and it will be properly
escaped.

<pre>
You can't make something actually <b>bold</b> within.
</pre>

Output:
<pre><code>This is within a block of code, so &lt; and &gt; should be
*entities*.  You can talk about a &lt;p&gt; tag if you wish and it
will be properly escaped.
</code></pre>

<pre>
You can&#39;t make something actually &lt;b&gt;bold&lt;/b&gt; within.
</pre>

What do you all think?  Is it better to automatically escape entities
within blocks of code like Texile2 does (and SRC currently does
not)?  I'm wondering if we should allow entities within blocks of
code to pass through SRC untouched.  <pre><b>bold</b></pre> is valid
HTML, but if it's automatically converted into <pre>&lt;b&:gt;...,
there's no way to have tags inside your pre tag.  On the other hand,
if we do that, you can't just paste in HTML and know it'll come out
looking fine... you'll have to convert the entities yourself.

Which way should SuperRedCloth go?

Jason
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.