Defect #7846

Headers (h1, etc.) containing backslash followed by a digit are not displayed correctly

Added by Etienne Massip over 6 years ago. Updated over 6 years ago.

Status:ClosedStart date:2011-03-12
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Text formatting
Target version:1.1.3
Resolution:Fixed Affected version:1.1.2

Description

Wiki page titles containing backslashes followed by a digit are not rendered properly because of the way String.gsub handles specifically this sequence with Ruby 1.8 (1.9 changed this behavior).

From Ruby String.gsub doc :

However, the sequences \1, \2, and so on may be used to interpolate successive groups in the match.

I made a patch.

textile_header_with_backslash_and_digit.patch Magnifier (2.17 KB) Etienne Massip, 2011-03-12 18:16

Associated revisions

Revision 5100
Added by Jean-Philippe Lang over 6 years ago

Fixed: Wiki headings containing backslash followed by a digit are not displayed correctly (#7846).

Contributed by Etienne Massip.

History

#1 Updated by Jean-Philippe Lang over 6 years ago

Would be nice to add a test to TextileFormatterTest.

#2 Updated by Etienne Massip over 6 years ago

I'll do so.

#3 Updated by Etienne Massip over 6 years ago

  • File textile_header_with_backslash_and_digit.patchMagnifier added
  • Subject changed from Wiki page titles containing backslash followed by a digit are not displayed correctly to Headers (h1, etc.) containing backslash followed by a digit are not displayed correctly
  • Category changed from Wiki to Text formatting

Here's the patch with test.

#4 Updated by Etienne Massip over 6 years ago

  • File deleted (wiki_page_title_with_backslash_and_digit.patch)

#5 Updated by Jean-Philippe Lang over 6 years ago

  • Status changed from New to Resolved
  • Target version changed from Candidate for next minor release to 1.1.3
  • Resolution set to Fixed

Patch applied in r5100, thanks. Just fixed the space before parenthesis in #assert_html_output.

#6 Updated by Jean-Philippe Lang over 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF