Ticket #50 (assigned defect)

Opened 8 months ago

Last modified 7 months ago

"<>" in code span encoded twice when filter_html is on

Reported by: ueno Owned by: deveiant
Priority: normal Milestone: Bugfixes
Component: API Version:
Severity: normal Keywords: filter_html escape code
Cc:

Description

I have tried code spans with filter_html enabled and found that "<>" are double-escaped.

b = BlueCloth.new('< > &') b.filter_html = true b.to_html #=> "<p><code>&amp;lt;</code> <code>&amp;gt;</code> <code>&amp;</code></p>"

Is this an intentional behavior? I suspect not so and I think it could be fixed by the attached patch.

Regards,

Attachments

BlueCloth-encode-code-double-escape.diff (0.7 kB) - added by ueno 8 months ago.

Change History

Changed 8 months ago by ueno

Changed 7 months ago by deveiant

  • keywords filter_html escape code added
  • status changed from new to assigned
  • component changed from MarkdownSyntax to API

Yep, you're entirely correct. I'll apply your patch. Thanks!

Note: See TracTickets for help on using tickets.