Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes with token in URL #7548

wants to merge 6 commits into
base: staging


None yet
1 participant
Copy link

commented May 21, 2019

Please be sure you are submitting this against the staging branch.

Bug fix? y
New feature?
Automated tests included?
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?


This PR resolved servera issues with tokens in url.

1, Noticed If we use in href token with modifier:

<a href="http://{pagelink=1}?special={contactfield=email|true}&date={contactfield=email}">my link</a>

froala change it to

<a href="http://{pagelink=1}?special={contactfield=email%7Ctrue}&date={contactfield=email}">my link</a>

2, Pagelink token is note replaced with link to page in redirectAction

  • <a href="http://{pagelink=1}?website={contactfield=website}">website</a> {pagelink=1}

Support for that was removed in 2.15.1 in this commit: 9377402#diff-613422155094384a8877d07ac664791dL458
I revert back and improve it.

Now working versions are

  • <a href="http://{pagelink=1}?website={contactfield=website}">website</a>
  • <a href="http://{contactfield=website}?website={contactfield=website}">website</a>
  1. sanitizeUrlQuery doesn' work If query already have ? symbol

Steps to reproduce the bug:

  1. Create email and add HTML
    website <a href="http://{contactfield=website}">website</a>
  1. Reopen HTML from wysiwyg and you see encode {contactfield=email%7Ctrue} (first bug)
  2. If you send email, these tokens are not like you expected
  • http://{pagelink=1} is trackable, but redirect is 404 with {pagelink=1} in URL
  • {contactfield=email%7Ctrue} is also not replaced with contact email address
  • http://{contactfield=website} were created as redirect URL, but redirection is to wrong address with encoded symbols http://domain.tld?some%3Dexample%3Futm_source%3Dtest&utm_medium=newsletter. We expect http://domain.tld?some%3DexampleF&utm_source=test&utm_medium=newsletter

Steps to test this PR:

  1. Load up this PR
  2. Repeat all steps and see If token is replaced correctly and redirection works

@kuzmany kuzmany added this to the 2.16.0 milestone May 21, 2019

kuzmany added some commits May 22, 2019

@kuzmany kuzmany changed the title Fix token with modifier in url Various fixes with token in URL May 22, 2019

@kuzmany kuzmany added WIP and removed Ready To Test labels May 22, 2019

@kuzmany kuzmany added Ready To Test and removed WIP labels May 22, 2019

kuzmany added some commits May 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.