encodeURIComponent in expandTokens