Attachment 'PageEditor.py.diff'

Download

   1 diff -r 23d2d4551cfe MoinMoin/PageEditor.py
   2 --- a/MoinMoin/PageEditor.py	Sat Jan 19 12:41:39 2008 +0100
   3 +++ b/MoinMoin/PageEditor.py	Sun Jan 27 21:21:08 2008 +0100
   4 @@ -12,11 +12,12 @@
   5  
   6      @copyright: 2000-2004 by Juergen Hermann <jh@web.de>,
   7                  2005-2007 by MoinMoin:ThomasWaldmann,
   8 -                2007 by MoinMoin:ReimarBauer
   9 +                2007 by MoinMoin:ReimarBauer,
  10 +                2008 by MoinMoin:RafaelWeber
  11      @license: GNU GPL, see COPYING for details.
  12  """
  13  
  14 -import os, time, codecs, errno
  15 +import os, time, codecs, errno, re
  16  
  17  
  18  from MoinMoin import caching, config, user, wikiutil, error
  19 @@ -777,8 +778,9 @@ Try a different name.""") % (wikiutil.es
  20              if request.dicts.has_dict(userDictPage):
  21                  variables.update(request.dicts.dict(userDictPage))
  22  
  23 -        for name in variables:
  24 -            text = text.replace('@%s@' % name, variables[name])
  25 +        pattern = '|'.join([v for k,v in variables.items()])
  26 +        text = re.sub('(?!\{\{\{)@(?P<name>%s)@(?!\}\}\})' % pattern,
  27 +                '\g<name>', text)
  28          return text
  29  
  30      def normalizeText(self, text, **kw):

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] (2008-01-27 20:22:11, 1.1 KB) [[attachment:PageEditor.py.diff]]
 All files | Selected Files: delete move to page copy to page

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