Skip to content

Commit

Permalink
Use quote format for layers parameter name in output urls
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarteau committed Mar 17, 2023
1 parent 0341db0 commit 3859985
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

## Unreleased

* Use quote format for layers parameter name in output urls
- Fix urlencoded parameters with space:
i.e: `layers=foo%20bar` instead of `layers=foo+bar` that
causes problem with Qgis server.

## 1.8.4 - 2022-12-16

* PEP8 Code style
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# qypws makefile
#

VERSION:=1.8.4
VERSION:=1.8.5

ifndef CI_COMMIT_TAG
VERSION_TAG=$(VERSION)rc0
Expand Down
4 changes: 2 additions & 2 deletions pyqgiswps/executors/io/layersio.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import traceback

from pathlib import Path
from urllib.parse import urlparse, urlencode, parse_qs
from urllib.parse import quote, urlparse, urlencode, parse_qs

from qgis.core import (QgsProcessing,
QgsProcessingParameterDefinition,
Expand Down Expand Up @@ -518,7 +518,7 @@ def parse_response(value: Any, outdef: QgsProcessingOutputDefinition, out: WPSOu
result = add_layer_to_load_on_completion(value, outdef, context)
if result:
result = ','.join(result)
out.url = output_url + '&' + urlencode((('layers', result),))
out.url = output_url + '&' + urlencode((('layers', result),), quote_via=quote)
else:
out.url = output_url

Expand Down

0 comments on commit 3859985

Please sign in to comment.