#213 new
Georg Friedrich

RedCloth produces double content for extended block with unrecognized tags

Reported by Georg Friedrich | March 25th, 2011 @ 04:37 AM

RedCloth 4.2.7 doubles the content for extended blocks for unrecognized tags.

Here is an example:

  #> RedCloth.new("foo.. bar\n\n").to_html
  => "<p>foo.. bar</p>\n<p>foo.. bar</p>"

The problem is that in red_block() the call CLEAR_REGS() doesn't clear the fallback key out of the register but assigns a new hash to the local variable.

I added a test case and fixed the problem here https://github.com/georg/redcloth/commit/d66e83bca2bf0457a703272b2f...

I can submit a pull request if you think the fix is okay.

No comments found

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