Ticket #11 (closed defect: wontfix)
HTML filter breaks transform_block_quotes
| Reported by: | Andreas Schwarz <rubyforge@…> | Owned by: | deveiant |
|---|---|---|---|
| Milestone: | Old Bugfixes | Component: | MarkdownSyntax |
| Version: | 1.0.0fc2 | Severity: | normal |
| Keywords: | block quotes filter html | Cc: |
Description
When filter_html = true, transform_block_quotes fails. Patch attached.
Change History
comment:2 Changed 7 years ago by deveiant
Date: 2004-11-07 08:09
Sender: Alexey Verkhovsky <alex@…>
Logged In: YES
user_id=723
Same story with auto-links, such as
<http://example.com>
comment:3 Changed 7 years ago by deveiant
Date: 2005-05-11 17:23
Sender: Michael Granger
Logged In: YES
user_id=158
Thanks for reporting this. I think I'm going to take the approach your patch does, but only check for the escaped version if html filtering is turned on.
I'll also apply the same logic to auto-links.
Note: See
TracTickets for help on using
tickets.

(Pasting the patch attached to the RubyForge? bug):
66d65 < 567a567,568 > # Pattern for matching a quoting character > QUOTE_REGEX = '(>|>)' 572c573 < ^[ ]*>[ ]? # '>' at the start of a line --- > ^[ ]*#{QUOTE_REGEX}[ ]? # '>' at the start of a line 588c589 < quote.gsub!( /^ *> ?/, '' ) # Trim one level of quoting --- > quote.gsub!( /^ *#{QUOTE_REGEX} ?/, '' ) # Trim one level of quoting