#95 ✓resolved
Chris Roos

<code> tag is escaped when it has the class attribute and is in a <pre> tag

Reported by Chris Roos | December 17th, 2008 @ 01:00 PM | in 4.1.9

This is expected behaviour.

>> RedCloth.new(%%<pre><code>some <b>bold</b> text</code></pre>%).to_html
=> "<pre><code>some &lt;b&gt;bold&lt;/b&gt; text</code></pre>"

This is unexpected (note that the opening tag has now been escaped, while the closing has not).

>> RedCloth.new(%%<pre><code class="ruby">some <b>bold</b> text</code></pre>%).to_html
=> "<pre>&lt;code class=\"ruby\"&gt;some &lt;b&gt;bold&lt;/b&gt; text</code></pre>"

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

RedCloth is a Ruby library for converting Textile into HTML

Shared Ticket Bins

People watching this ticket


Referenced by