Commit 89bc4409 authored by Tomáš Peterka's avatar Tomáš Peterka

[json_style] Replace + for spaces in embedded URL values

parent e3712bc4
...@@ -947,7 +947,10 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None, ...@@ -947,7 +947,10 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
if len(query_split) == 2: if len(query_split) == 2:
for query_parameter in query_split[1].split("&"): for query_parameter in query_split[1].split("&"):
query_key, query_value = query_parameter.split("=") query_key, query_value = query_parameter.split("=")
REQUEST.set(query_key, query_value) # since humans are lazy they are using + in URLs instead of %20
# so we mitigate here
# set URL params into REQUEST (just like it was sent by form)
REQUEST.set(query_key, query_value.replace("+", " "))
renderForm(traversed_document, renderer_form, embedded_dict) renderForm(traversed_document, renderer_form, embedded_dict)
result_dict['_embedded'] = { result_dict['_embedded'] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment