Mautic changes link including & and returns 404

Hi support,

When I use a link that includes ampersand & such as Mautic transforms it into[...]jc6ImNoYW5uZWwiO2E6MTp7czo1OiJlbWFpbCI7aTo3Mjt9fQ%3D%3D& which in turn redirects to giving the error in the browser: /cart_php=?a=add&pid=229 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36 404

Is it possible that Mautic doesn’t recognise the & character because it changes it in one of the links to ? and it stops working as a link?

If I shorten the initial link with bitly or whatever, then it works, but if I use the original one that includes & it stops working.

Shouldn’t the links with & used in shopping carts or checkout pages work?

Any thoughts on this? :thinking:

Mautic 4.3.1
nginx: 1.16
PHP: 7.4
MariaDB: 10.3.32


1 Like

Has anyone experienced this or something similar with the use of & in links that Mautic reinterprets?


Yes, we just came across this when referencing internal Sharepoint files so the “…m / : b : / t…” [I had to put spaces in-between to stop it converting in this viewer] part of the URL is changed to
2022-07-12_6-45-09 and seems to be converted to %F0%9F%85%B1 in the URL which causes it to have a 404

We are running 4.1.1.

Thanks for the idea of using a redirection URL as a work around!

1 Like