web/component.py
branchstable
changeset 6280 e220f8b85f88
parent 6265 27417b8b94ed
child 6333 e3994fcc21c3
--- a/web/component.py	Thu Sep 16 18:43:46 2010 +0200
+++ b/web/component.py	Fri Sep 17 12:34:03 2010 +0200
@@ -147,6 +147,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):
@@ -157,10 +161,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)