[Checkins] SVN: zope3org/trunk/src/zorg/wikification/browser/ Added
an event handler for absolute external links.
Uwe Oestermeier
uwe_oestermeier at iwm-kmrc.de
Wed Jun 28 07:20:18 EDT 2006
Log message for revision 68875:
Added an event handler for absolute external links.
Changed:
U zope3org/trunk/src/zorg/wikification/browser/templates/comment.pt
U zope3org/trunk/src/zorg/wikification/browser/wikilink.py
-=-
Modified: zope3org/trunk/src/zorg/wikification/browser/templates/comment.pt
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/templates/comment.pt 2006-06-27 22:27:22 UTC (rev 68874)
+++ zope3org/trunk/src/zorg/wikification/browser/templates/comment.pt 2006-06-28 11:20:16 UTC (rev 68875)
@@ -1,7 +1,7 @@
<a name="comment" tal:attributes="name string:comment${view/info/key}"></a>
<span class="entry-timestamp" style="float:left;" tal:content="view/info/key">
1.
-</span><span>. posted by </span><span tal:content="view/info/who">
+</span><span>. by </span><span tal:content="view/info/who">
Author
</span><span> at</span>
<span tal:content="view/info/when">
Modified: zope3org/trunk/src/zorg/wikification/browser/wikilink.py
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/wikilink.py 2006-06-27 22:27:22 UTC (rev 68874)
+++ zope3org/trunk/src/zorg/wikification/browser/wikilink.py 2006-06-28 11:20:16 UTC (rev 68875)
@@ -197,6 +197,10 @@
def onAbsoluteLink(self, link) :
""" Event handler that can be specialized. """
return link
+
+ def onAbsoluteExternalLink(self, link) :
+ """ Event handler that can be specialized. """
+ return link
def traverseName(self, node, name) :
for ext in u'', u'.html', u'.txt' :
@@ -248,7 +252,6 @@
def unknown_starttag(self, tag, attrs):
""" Called for each tag. Calls link event handlers. """
-
if tag in self.link_refs :
result = []
for key, value in attrs :
@@ -407,6 +410,7 @@
link = link[len(site_url)+1:]
node = page.site
elif self.isAbsoluteURL(link) :
+ link = self.onAbsoluteExternalLink(link)
return False, link
elif link.startswith("#") :
return False, link
More information about the Checkins
mailing list