Hello there,
I think I have found an obscure bug in the aforementioned procs. It is very easy to reproduce for export_vars, but also the other proc is affected.
Try this code
set test --
export_vars {test}
or
set -- whatever
export_vars {"--"}
It will complain about wrong args in ns_urlencode. This is because the "--" has special meaning for ns_urlencode, separating flags from arguments.
If you replace all ns_urlencode calls into the procs from
ns_urlencode $var
to
ns_urlencode -- $var
things go ok.
NOTE: current export_vars encodes url path AND variables using the same ns_urlencode, which is wrong AFAIK.
export_entire_form_as_url_vars encodes variables using ad_urlencode_query instead, which should be the right way to go. I think we should fix this, as export_vars should be the preferred interface for exporting.
If someone confirms this is a bug I can take care of the fix.
All the best