If you use a token in the redirect field and the token is not found at execute time, the token itself will be escaped and added to the redirect url. This is very undesirable if you want to use a token to prepopulate a webform field from a url query parameter, for example.

token_replace() has an option to not output empty tokens - let's use it. This should not break anything, because if the empty token was being output as a path argument that path would be broken anyway.

Patch to follow.

Comments

johnpitcairn’s picture

Assigned: johnpitcairn » Unassigned
Status: Active » Needs review
StatusFileSize
new687 bytes

And patch...

olofbokedal’s picture

Status: Needs review » Fixed

Nice, didn't realize such an option existed.

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.