RSS feature doesn't work?

Fujio Nobori <[email protected]>
Newsgroups gmane.comp.web.wiki.moin.devel
Message-ID <[email protected]>
Hello,

I am not sure this is happening just to me, but I am
reporting it anyway.

I am using 1.2.1, new release.

Well, when I click "RSS" button in RecentChange page, the
page attached as test.html is shown.

Yes, I am using utf-8 site name and utf-8 page names.  I
checked the code and found that I need the patch to
wikixml/util.py:

40c40
<         if value: self.characters(unicode(value, config.charset))
---
>         if value: self.characters(value)

But then, I saw the page attached as test2.html.  I checked
the code again and found that the problem would disappear if
I patched wikixml/util.py as folows:

52a53,74
>     def startElementNS(self, name, qname, attrs):
>         if name[0] is None:
>             # if the name was not namespace-scoped, use the unqualified part
>             name = name[1]
>         else:
>             # else try to restore the original prefix from the namespace
>             name = self._current_context[name[0]] + ":" + name[1]
>         self._out.write('<' + name)
> 
>         for pair in self._undeclared_ns_maps:
>             self._out.write(' xmlns:%s="%s"' % pair)
>         self._undeclared_ns_maps = []
> 
>         for (name, value) in attrs.items():
>             if name[0] is None:
>                 # if the name was not namespace-scoped, use the unqualified part
>                 name = name[1]
>             else:
>                 name = self._current_context[name[0]] + ":" + name[1]
>             self._out.write(' %s=%s' % (name, saxutils.quoteattr(value)))
>         self._out.write('>')
> 

This code is mostly from xml/sax/saxutils.py in python 2.3,
but I added the code to handle the "name" value correctly
when attrs have an item like (None, 'link').

I don't think these are good solutions, but they seem to be
working, at least for me.

Thank you very much.

-- 
Fujio Nobori                                     il|li
    email: [email protected]                   q|@.@|p
                                              m. ( o ) .m
                                             ~~~~~~~~~~~~~
err_pages.tgz (application/x-tar-gz, 3.3 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.