#201 open
Geoff Drake

Inner tag getting escaped

Reported by Geoff Drake | December 18th, 2010 @ 09:08 AM

I am using RedCloth from within Webgen and I have created a Webgen plugin to wrap images. It outputs the following line:

<a href='#{image_original}' id='gallery' class='lightbox' #{titlestr}><img src='#{image_small}' class='#{cls}' #{titlestr} #{altstr} onLoad ='$(\"a.lightbox\").lightBox();'/></a>

Using 4.1.9 this renders as correct HTML.

Using 4.2.0 it renders the <a> tag correctly, but then escapes the img tag with &lt; &gt; etc. Is there any change I can make to the generation string to make it work, or is this a bug?

Comments and changes to this ticket

  • Jason Garber

    Jason Garber February 1st, 2011 @ 10:25 AM

    • State changed from “new” to “open”
    • Tag changed from l not rendering, htm, img to code, escaping, html

    I think it's a bug. Lots of HTML/code/escaping problems that I can't seem to solve with the current parser. Needs a rewrite in something better.

  • Jason Garber

    Jason Garber February 1st, 2011 @ 10:31 AM

    • Title changed from “Regression Bug 4.1.9 -> 4.2.0” to “Inner tag getting escaped”

    Can you provide the exact string that's going into RedCloth.new? I should be able to duplicate it using the redcloth CLI, but when I put in the string you provided, I get a different result than you described:

    $ redcloth 
    <a href='#{image_original}' id='gallery' class='lightbox' #{titlestr}><img src='#{image_small}' class='#{cls}' #{titlestr} #{altstr} onLoad ='$(\"a.lightbox\").lightBox();'/></a>
    # Press Ctrl+D
    <p>&lt;a href=&#8216;#{image_original}&#8217; id=&#8216;gallery&#8217; class=&#8216;lightbox&#8217; #{titlestr}&gt;&lt;img src=&#8216;#{image_small}&#8217; class=&#8216;#{cls}&#8217; #{titlestr} #{altstr} onLoad =&#8216;$(\&#8220;a.lightbox\&#8221;).lightBox();&#8217;/&gt;</a></p>
    

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

Pages