~ubuntu-branches/ubuntu/natty/moin/natty-security

« back to all changes in this revision

Viewing changes to MoinMoin/formatter/text_docbook.py

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2010-08-11 12:35:34 UTC
  • mfrom: (0.1.19 sid)
  • Revision ID: james.westby@ubuntu.com-20100811123534-q8zu7qrwqul6cvec
Tags: 1.9.3-1ubuntu1
* Merge from Debian unstable (LP: #586518). Based on work by Stefan Ebner.
  Remaining changes:
 - Remove python-xml from Suggests field, the package isn't anymore in
   sys.path.
 - Demote fckeditor from Recommends to Suggests; the code was previously
   embedded in moin, but it was also disabled, so there's no reason 
   for us to pull this in by default currently. Note: fckeditor has a
   number of security problems and so this change probably needs to be
   carried indefinitely.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
    @license: GNU GPL, see COPYING for details.
10
10
"""
11
11
 
12
 
import os
 
12
import os, re
13
13
 
14
14
from xml.dom import getDOMImplementation
15
15
from xml.dom.ext.reader import Sax
611
611
            was_in_para = self.cur.nodeName == "para"
612
612
            if was_in_para:
613
613
                self.paragraph(0)
614
 
            text = FormatterBase.macro(self, macro_obj, name, args)
 
614
 
 
615
            # Regular Expression to match editlink arg, remove it because it causes trouble.
 
616
            _arg_editlink = r'(,\s*(?P<editlink>editlink))?'
 
617
            macro_args = re.sub(_arg_editlink, '', args)
 
618
 
 
619
            text = FormatterBase.macro(self, macro_obj, name, macro_args)
615
620
            if text.strip():
616
621
                self._copyExternalNodes(Sax.FromXml(text).documentElement.childNodes, exclude=excludes)
617
622
            if was_in_para: