--- a/web/component.py Tue Sep 21 16:35:37 2010 +0200
+++ b/web/component.py Thu Sep 23 23:28:58 2010 +0200
@@ -110,6 +110,10 @@
url = self.ajax_page_url(**params)
else:
url = self._cw.build_url(path, **params)
+ # XXX hack to avoid opening a new page containing the evaluation of the
+ # js expression on ajax call
+ if url.startswith('javascript:'):
+ url += '; noop();'
return url
def ajax_page_url(self, **params):
@@ -120,10 +124,6 @@
def page_link(self, path, params, start, stop, content):
url = xml_escape(self.page_url(path, params, start, stop))
- # XXX hack to avoid opening a new page containing the evaluation of the
- # js expression on ajax call
- if url.startswith('javascript:'):
- url += '; noop();'
if start == self.starting_from:
return self.selected_page_link_templ % (url, content, content)
return self.page_link_templ % (url, content, content)