Strip trailing spaces on the redirect paths before they hit the API

- "An error posting to the Publishing API" was being raised with no
  further context for users that it could have been (and in the case
  reported in Slack, was indeed) a whitespace issue.