From 3cea75d0f269b4ee343c2fef5b799fe9fa2dfbe1 Mon Sep 17 00:00:00 2001 From: Michael Merickel <michael@merickel.org> Date: Fri, 20 Apr 2018 04:51:12 +0200 Subject: [PATCH] Merge pull request #3259 from mmerickel/backport-3229-to-1.8-branch --- pyramid/url.py | 46 +++++++++++++++++++++++----------------------- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pyramid/url.py b/pyramid/url.py index 86abf89..288b91e 100644 --- a/pyramid/url.py +++ b/pyramid/url.py @@ -165,15 +165,14 @@ ``*remainder`` replacement value, it is tacked on to the URL after being URL-quoted-except-for-embedded-slashes. - If no ``_query`` keyword argument is provided, the request query string - will be returned in the URL. If it is present, it will be used to - compose a query string that will be tacked on to the end of the URL, - replacing any request query string. The value of ``_query`` may be a - sequence of two-tuples *or* a data structure with an ``.items()`` - method that returns a sequence of two-tuples (presumably a dictionary). - This data structure will be turned into a query string per the - documentation of :func:`pyramid.url.urlencode` function. This will - produce a query string in the ``x-www-form-urlencoded`` format. A + If ``_query`` is provided, it will be used to compose a query string + that will be tacked on to the end of the URL. The value of ``_query`` + may be a sequence of two-tuples *or* a data structure with an + ``.items()`` method that returns a sequence of two-tuples + (presumably a dictionary). This data structure will be turned into + a query string per the documentation of the + :func:`pyramid.url.urlencode` function. This will produce a query + string in the ``x-www-form-urlencoded`` format. A non-``x-www-form-urlencoded`` query string may be used by passing a *string* value as ``_query`` in which case it will be URL-quoted (e.g. query="foo bar" will become "foo%20bar"). However, the result @@ -359,20 +358,21 @@ ``elements`` are used, the generated URL will *not* end in a trailing slash. - If a keyword argument ``query`` is present, it will be used to compose - a query string that will be tacked on to the end of the URL. The value - of ``query`` may be a sequence of two-tuples *or* a data structure with - an ``.items()`` method that returns a sequence of two-tuples - (presumably a dictionary). This data structure will be turned into a - query string per the documentation of :func:`pyramid.url.urlencode` - function. This will produce a query string in the - ``x-www-form-urlencoded`` encoding. A non-``x-www-form-urlencoded`` - query string may be used by passing a *string* value as ``query`` in - which case it will be URL-quoted (e.g. query="foo bar" will become - "foo%20bar"). However, the result will not need to be in ``k=v`` form - as required by ``x-www-form-urlencoded``. After the query data is - turned into a query string, a leading ``?`` is prepended, and the - resulting string is appended to the generated URL. + If ``query`` is provided, it will be used to compose a query string + that will be tacked on to the end of the URL. The value of ``query`` + may be a sequence of two-tuples *or* a data structure with an + ``.items()`` method that returns a sequence of two-tuples + (presumably a dictionary). This data structure will be turned into + a query string per the documentation of the + :func:`pyramid.url.urlencode` function. This will produce a query + string in the ``x-www-form-urlencoded`` format. A + non-``x-www-form-urlencoded`` query string may be used by passing a + *string* value as ``query`` in which case it will be URL-quoted + (e.g. query="foo bar" will become "foo%20bar"). However, the result + will not need to be in ``k=v`` form as required by + ``x-www-form-urlencoded``. After the query data is turned into a query + string, a leading ``?`` is prepended, and the resulting string is + appended to the generated URL. .. note:: -- Gitblit v1.9.3