Ticket #11 (assigned defect)

Opened 3 years ago

Last modified 2 years ago

HTML filter breaks transform_block_quotes

Reported by: Andreas Schwarz <rubyforge@…> Owned by: deveiant
Priority: normal Milestone: 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

Changed 3 years ago by deveiant

  • status changed from new to assigned

(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 

Changed 3 years ago by deveiant

Date: 2004-11-07 08:09[[br]] Sender: Alexey Verkhovsky <alex@…>
Logged In: YES
user_id=723

Same story with auto-links, such as

<http://example.com>

Changed 3 years ago by deveiant

Date: 2005-05-11 17:23[[br]] 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.

Changed 2 years ago by deveiant

  • milestone changed from Markdown 1.0.1 to Bugfixes
Note: See TracTickets for help on using tickets.