[Moin-devel] RSS feature doesn't work?
Fujio Nobori
toh at fuji-climb.org
Mon Mar 8 02:43:01 EST 2004
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: toh at fuji-climb.org q|@.@|p
m. ( o ) .m
~~~~~~~~~~~~~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: err_pages.tgz
Type: application/x-tar-gz
Size: 3362 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/moin-devel/attachments/20040308/65b56180/attachment.bin>
More information about the Moin-devel
mailing list