Modify

Opened 8 years ago

Closed 7 years ago

#1233 closed defect (fixed)

RSS feed does not set title correctly if blog page has leading whitespace

Reported by: athomas Owned by: pacopablo
Priority: low Component: TracBlogPlugin
Severity: minor Keywords:
Cc: Trac Release: 0.10

Description

If a blog post has whitespace before the first heading, the title regex will not match. This patch works for me, YMMV.

  • blog/web_ui.py

     
    3939from tractags.api import TagEngine
    4040from tractags.parseargs import parseargs
    4141
    42 _title_split_match = re.compile(r'^=+\s+([^\n\r=]+?)\s+=+\s+(.+)$',
    43                                 re.DOTALL).match
     42_title_split_match = re.compile(r'\s*^=+\s+([^\n\r=]+?)\s+=+\s+(.+)$',
     43                                re.MULTILINE|re.DOTALL).match
    4444
    4545BOOLS_TRUE = ['true', 'yes', 'ok', 'on', 'enabled', '1']
    4646

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by pacopablo

  • Resolution set to fixed
  • Status changed from new to closed

Patch applied in [2399]

Add Comment

Modify Ticket

Action
as closed The owner will remain pacopablo.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.