Edgewall Software

Opened 10 years ago

Last modified 9 years ago

#11773 closed defect

Image links based on RFC2397 not supported — at Initial Version

Reported by: Dirk Stöcker Owned by:
Priority: normal Milestone: 1.0.5
Component: wiki system Version: 1.0.1
Severity: normal Keywords:
Cc: leho@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Directly included images in this RFC format http://tools.ietf.org/html/rfc2397 aren't supported. They don't work in [[Image()]] macro nor in #!html processor.

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoAQMAAAC2MCouAAAAA1BMVEXLQ0MOAUiXAAAAC0lEQVQIHWMYYQAAAPAAASEIRrcAAAAASUVORK5CYII=

See also #8168 which comes up again, as there is a comma in the string which can't be encoded as %2c, otherwise fix would be easy.

Fix for "data:" is easy, simply handle it like http:, but the comma is a problem again. Proper argument splitting is required.

  • macros.

    old new  
    581581        parts = filespec.split(':')
    582582        url = raw_url = desc = None
    583583        attachment = None
    584         if (parts and parts[0] in ('http', 'https', 'ftp')): # absolute
     584        if (parts and parts[0] in ('http', 'https', 'ftp', 'data')): # absolute
     585            if parts[0] == "data":
     586              filespec = filespec.replace("%2C", ",")
    585587            raw_url = url = filespec
    586588            desc = url.rsplit('?')[0]
    587589        elif filespec.startswith('//'):       # server-relative

Simple patch with a workaround for the comma issue.

Change History (0)

Note: See TracTickets for help on using tickets.