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.
  • [get | view] (2009-03-01 11:39:57, 0.9 KB) [[attachment:1_9-devel_local_server_config.bundle]]
  • [get | view] (2007-07-27 20:50:57, 12.4 KB) [[attachment:IncludeWithAttachment20070727.py]]
  • [get | view] (2007-09-25 12:38:06, 18.2 KB) [[attachment:raphaelbossek.jpg]]
  • [get | view] (2007-08-15 20:55:02, 2.5 KB) [[attachment:test_parser_unicode.py]]
  • [get | view] (2007-07-27 20:49:55, 1.4 KB) [[attachment:text_xslt.patch]]
  • [get | view] (2007-08-10 20:44:42, 1.7 KB) [[attachment:text_xslt.py.txt]]
  • [get | view] (2007-08-09 20:16:03, 2.3 KB) [[attachment:utf8bug.py]]
 All files | Selected Files: delete move to page copy to page

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