Attachment 'pytidy.patch'
Download 1 diff -r 67e542fc0f81 MoinMoin/converter/text_html_text_moin_wiki.py
2 --- a/MoinMoin/converter/text_html_text_moin_wiki.py Tue Mar 02 21:17:25 2010 +0300
3 +++ b/MoinMoin/converter/text_html_text_moin_wiki.py Tue Mar 02 20:36:13 2010 +0100
4 @@ -17,7 +17,10 @@
5 from MoinMoin.parser.text_moin_wiki import Parser as WikiParser
6 interwiki_re = re.compile(WikiParser.interwiki_rule, re.VERBOSE|re.UNICODE)
7
8 -
9 +try:
10 + import tidylib
11 +except ImportError:
12 + tidylib = None
13 # Portions (C) International Organization for Standardization 1986
14 # Permission to copy in any form is granted for use with
15 # conforming SGML systems and applications as defined in
16 @@ -1435,6 +1438,13 @@
17 # Due to expat needing explicitly set namespaces, we set these here to allow pasting
18 # from Word / Excel without issues.
19 # If you encounter 'ExpatError: unbound prefix', try adding the namespace to the list.
20 + if tidylib:
21 + text, errors = tidylib.tidy_fragment(text,
22 + options={'numeric-entities': 1,
23 + 'indent': 0,
24 + 'wrap': 0,
25 + 'output-xhtml': 1})
26 +
27 namespace = [u'xmlns:o="urn:schemas-microsoft-com:office:office"',
28 u'xmlns:x="urn:schemas-microsoft-com:office:excel"',
29 u'xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"',
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.You are not allowed to attach a file to this page.