mod_base: fix to let urlencode handle iolists as input.
This can happen when used in combination with a {% filter urlencode %}...{% endfilter %} block.

(cherry picked from commit e8162f874aecc7af444f7f9f59ec1f66779528e3)