Attachment 'text_xslt.patch'
Download 1 # HG changeset patch
2 # User Raphael Bossek <raphael.bossek@gmx.de>
3 # Date 1185565512 -7200
4 # Node ID e35b2d00b1b6fc6cb6075c1c4136ac2d1e1148e8
5 # Parent b6c92549b7cbe59858c64433f36b48a01c9dd7ca
6 Decode XML content only if 4Suite is available. Otherwise keep the data as it is. UTF-8 encoded XML files has to be processed unchanged.
7
8 diff -r b6c92549b7cb -r e35b2d00b1b6 MoinMoin/parser/text_xslt.py
9 --- a/MoinMoin/parser/text_xslt.py Thu Jul 26 13:03:11 2007 +0200
10 +++ b/MoinMoin/parser/text_xslt.py Fri Jul 27 21:45:12 2007 +0200
11 @@ -28,7 +28,7 @@ class Parser:
12 Dependencies = Dependencies
13
14 def __init__(self, raw, request, **kw):
15 - self.raw = raw.encode(config.charset)
16 + self.raw = raw
17 self.request = request
18 self.form = request.form
19 self._ = request.getText
20 @@ -87,8 +87,10 @@ class Parser:
21 input_factory = InputSource.InputSourceFactory(resolver=wiki_resolver)
22
23 page_uri = self.base_uri + wikiutil.url_quote(formatter.page.page_name)
24 - raw = self.raw.strip()
25 -
26 +
27 + # 4Suite need ASCII coding instead of UTF-8.
28 + raw = self.raw.strip().encode(config.charset)
29 +
30 self.processor = Processor()
31 self.append_stylesheet() # hook, for extending this parser
32 self.processor.run(
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.