Fix #1985 "Publish: document parameter value is not encoded"