# HG changeset patch # User RĂ©mi Cardona # Date 1363196209 -3600 # Node ID d4d9f33fd01b3a3511e6d96bfe0c4e1978206bca # Parent ea3fc8e1edee0632ef8c94c90fd8913644aa0fed [web/request] Prune extraneous 'pageid' from generated ajax URL parameters (closes #2758130) If 'pageid' is given through extraparams, it is sent twice to the browser. On the JS side, the final URL loadxhtml() will end up using will have 'pageid' set twice which CubicWeb will readily accept as a list. Pruning this parameter makes sure it is exactly once. diff -r ea3fc8e1edee -r d4d9f33fd01b web/request.py --- a/web/request.py Wed Mar 13 19:23:22 2013 +0100 +++ b/web/request.py Wed Mar 13 18:36:49 2013 +0100 @@ -714,6 +714,9 @@ # after having url unescaping the content. This may make appear some # quote or other special characters that will break the js expression. extraparams.setdefault('fname', 'view') + # remove pageid from the generated URL as it's forced as a parameter + # to the loadxhtml call below. + extraparams.pop('pageid', None) url = self.build_url('ajax', **extraparams) cbname = build_cb_uid(url[:50]) # think to propagate pageid. XXX see https://www.cubicweb.org/ticket/1753121