Skip to content

Listbox,SelectionTool: use make_query instead of crafting URL manually

Jérome Perrin requested to merge feat/selection_make_query into master

Using make_query makes sure that the query parameters are properly encoded and also change selection_index to become an int, because it keeps the type of parameters.

As a consequence, we had to adjust a few place in the code where selection_index was tested for truthiness: because "0" as a string is true, but 0 as an int is not. For that, we changed to test the presence of selection_name instead of testing selection_index, as they are always used together.

This fixes a problem that & in URL was encoded twice for listbox anchor links ( bug_module/1137 )

Edited by Jérome Perrin

Merge request reports