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

- This was raising "An error posting to the Publishing API" with no
  further context for users that it was a whitespace issue. Thanks to
  David S. on Slack.