Attachment 'patch-fix-docbook-image-URLs.diff'

Download

   1 # HG changeset patch
   2 # User Paul Boddie <paul@boddie.org.uk>
   3 # Date 1385837274 -3600
   4 # Node ID 9a9ad16c62fb483937072c53f57859ec6ae53c16
   5 # Parent  2061aa0dff6d7e2dc103beeefa5b128d556c01a1
   6 Fixed image URL generation, avoiding script name duplication.
   7 
   8 diff -r 2061aa0dff6d -r 9a9ad16c62fb MoinMoin/formatter/text_docbook.py
   9 --- a/MoinMoin/formatter/text_docbook.py	Sat Nov 30 21:31:52 2013 +0800
  10 +++ b/MoinMoin/formatter/text_docbook.py	Sat Nov 30 19:47:54 2013 +0100
  11 @@ -440,7 +440,7 @@
  12              src = kw['src']
  13              if src.startswith("/"):
  14                  # convert to absolute path:
  15 -                src = self.request.url_root + src
  16 +                src = self.request.getQualifiedURL(src)
  17              image.setAttribute('fileref', src)
  18          if kw.has_key('width'):
  19              image.setAttribute('width', str(kw['width']))

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2013-11-30 19:03:22, 0.8 KB) [[attachment:patch-fix-docbook-image-URLs.diff]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.