Changeset 3284

Show
Ignore:
Timestamp:
02/28/08 03:36:33 (11 months ago)
Author:
osimons
Message:

FullBlogPlugin: Bug - follow-up to [3283]. Of course the link won't always consist of two segments.

References #2647

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • fullblogplugin/0.11/tracfullblog/core.py

    r3283 r3284  
    123123            # Assume it is a regular post, and pass to 'view' 
    124124            # Split for comment linking (the_post#comment-1, or #comment-1) 
    125             url, anchor = unicode_unquote(content).split('#') 
     125            segments = unicode_unquote(content).split('#') 
     126            if len(segments) == 2: 
     127                url, anchor = segments 
     128            else: 
     129                url = segments[0] 
     130                anchor = '' 
    126131            return tag.a(label, href=(url and formatter.href.blog(url) or '') \ 
    127132                    + (anchor and '#' + anchor or ''))