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

Fix token link in code mode editor #7921

wants to merge 4 commits into
base: staging


Copy link

kuzmany commented Oct 4, 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) #7917
BC breaks?


This PR fixed bug in code mode editor.
If you use CTRL + SPACE BAR for token drop down and want use Assets or Page link, code mode editor generate:

<a title='Asset Link' href='{assetlink=1}'>foto_1.jpg</a>

After save this is cleaning to

<a title='Asset Link'>foto_1.jpg</a>

Because it's not valid HTML.

This PR add reguler format of link

<a title="Asset Link" href="{assetlink=1}">foto_1.jpg</a>

Steps to reproduce the bug:

  1. Create an asset
  2. Create an email in code mode
  3. Edit the email to insert the asset link via control + space shortcut
  4. Use the Apply button in the editor to validate change
  5. See that the link vanish and the token doesn't work.

Steps to test this PR:

  1. Load up this PR
  2. Repeat all steps, and see If your link work properly
Copy link

florentpetitjean left a comment

Tested and works perfectly.

Copy link

florentpetitjean left a comment

I discover that token in editor mode are broken with this PR, they can't be insert anymore and link directly to the asset download.

Step to reproduce :

  1. Create an asset
  2. Create a new email
  3. open the editor
  4. Try using the "insert token" feature in a text block
  5. See that asset token are broken


@npracht npracht added Ready To Test and removed WIP labels Oct 15, 2019
Copy link

florentpetitjean left a comment

Tested with modification and it's working for both code mode and editor mode now.
Good job !

@npracht npracht added this to Ready to Commit (passed testing) in Mautic 2 Oct 15, 2019

This comment has been minimized.

Copy link

mautibot commented Oct 19, 2019

This pull request has been mentioned on Mautic Community Forums. There might be relevant details there:

@kuzmany kuzmany dismissed stale reviews from florentpetitjean and Dcoutelle via f053475 Oct 29, 2019
Mautic 2 automation moved this from Ready to Commit (passed testing) to Changes Requested / Review Oct 29, 2019

This comment has been minimized.

Copy link
Contributor Author

kuzmany commented Oct 29, 2019

@florentpetitjean Test now.
Code mode and also editor mode.
Should works now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Mautic 2
Changes Requested / Review
5 participants
You can’t perform that action at this time.