Changeset 112:fce60c5487d3

Show
Ignore:
Timestamp:
2007-08-01 18:14:09 (1 year ago)
Author:
Stefan Schwarzer <sschwarzer@sschwarzer.net>
branch:
default
Message:
Fixed now-redundant quoting in `image_to_html`.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • converter.py

    r107 r112  
    180180            path = os.path.abspath(os.readlink(path)) 
    181181        lexer = pygments_finder.lexers.guess_lexer_for_filename(path, text) 
    182     except lexers.ClassNotFound: 
     182    except pygments_finder.lexers.ClassNotFound: 
    183183        # files with many extensions are actually XML files, so 
    184184        #  test explicitly for them 
     
    196196    which can be found under the absolute `url`. 
    197197    """ 
    198     image_source = "/%s/raw_data?url=%s" % (config.SPECIAL_DIR, 
    199                                             urllib.quote(url)) 
     198    image_source = "/%s/raw_data?url=%s" % (config.SPECIAL_DIR, url) 
    200199    return u'<img src="%s" />' % image_source 
    201200 
     
    218217            hexa = "%s %s" % (hexa[:23], hexa[23:]) 
    219218        printable = s.translate(filter_) 
    220         result.append("%08X    %-*s    %s\n" % (i, length*3, hexa, 
    221                                                 printable)) 
     219        result.append("%08X    %-*s    |%s|\n" % (i, length*3, hexa, 
     220                                                  printable)) 
    222221    return dumb_text_to_html(''.join(result)) 
    223222