[Checkins]
SVN: zope3org/trunk/src/zorg/wikification/browser/wikilink.py
Fixed an encoding problem.
Uwe Oestermeier
uwe_oestermeier at iwm-kmrc.de
Fri Jul 7 12:14:38 EDT 2006
Log message for revision 69030:
Fixed an encoding problem.
Changed:
U zope3org/trunk/src/zorg/wikification/browser/wikilink.py
-=-
Modified: zope3org/trunk/src/zorg/wikification/browser/wikilink.py
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/wikilink.py 2006-07-07 15:44:05 UTC (rev 69029)
+++ zope3org/trunk/src/zorg/wikification/browser/wikilink.py 2006-07-07 16:14:38 UTC (rev 69030)
@@ -20,7 +20,7 @@
import re, urllib, cgi, os
import zope
-import zope.contenttype
+#import zope.contenttype
from zope.interface import implements
from zope.component import adapts
@@ -42,6 +42,7 @@
from zorg.wikification.browser.interfaces import IWikiPage
from zorg.wikification.browser.interfaces import ILinkProcessor
+
class Placeholder(PageElement) :
""" A base placeholder that renders a wikified link without id but
with a special css.
@@ -540,6 +541,7 @@
"""
html = RelativeLinkProcessor.output(self)
for placeholder in self.placeholders.values() :
+
html = placeholder.postProcessing(html)
return html
@@ -576,7 +578,7 @@
super(MenuPlaceholder, self).__init__(processor, index, label, link)
self.enabled = processor.page.isEditable()
self.menu_id = processor.createMenuId(index)
- self.onMouseOver = "WikiMenu.dropDown(this, event, '%s');" % self.menu_id
+ self.onMouseOver = "WikiMenu.dropDown(this, event, '%s', '');" % self.menu_id
def startTag(self, attrs) :
""" Called when a starttag for a placeholder is detected. """
@@ -762,7 +764,7 @@
def postProcessing(self, html) :
""" Replaces a textual WikiLink globally. """
if self.global_scope and self.new_link :
- html = html.replace("[%s]" % self.label, self.new_link)
+ replaced = html.replace("[%s]" % self.label, self.new_link)
return html
@@ -781,7 +783,8 @@
contenttype = self.page.parameter('contenttype')
filename = self.filename("data", label)
- filename = unicode(filename, encoding="utf-8")
+ if not isinstance(filename, unicode) :
+ filename = unicode(filename, encoding="utf-8")
name = filename or self.page.parameter('name')
if not contenttype :
More information about the Checkins
mailing list