spatie / ray

Debug with Ray to fix problems faster
https://myray.app
MIT License
554 stars 102 forks source link

Emails that contain a link with an ampersand are not rendering correctly #877

Open travisricks opened 7 months ago

travisricks commented 7 months ago

Describe the bug I'm using Ray to preview mails sent by my application. After triggering a Jetstream email verification mail, the verification link rendered inside of Ray is not correct.

Expected url: http://forum.test/email/verify/1/1e9bb8c1adf3a4e8ae985e4574a0a16ae1b8feb4?expires=1701572264&signature=bfea3a16f5b89bc753278e3b7a143e626ac9185f827ad977bac2a47caed47c49 Rendered in Ray: http://forum.test/email/verify/1/1e9bb8c1adf3a4e8ae985e4574a0a16ae1b8feb4?expires01572264&signature?ea3a16f5b89bc753278e3b7a143e626ac9185f827ad977bac2a47caed47c49

The bit after expires seems to be rendering incorrectly.

Versions Ray version (you can see this in "About Ray"): 2.7.5

You can use composer show to get the version numbers of:

PHP version: 8.2.13 Laravel version (if applicable): 10.34.2

To Reproduce Steps to reproduce the behavior:

  1. Set up Ray to preview mails
  2. Trigger Jetstream email verification mail to be sent
  3. Try copy/pasting the verification url at the bottom of the email
  4. See 403 Invalid Signature error in the browser (because url has a space and timestamp is invalid)

Expected behavior The link should be copyable from Ray to be used in the browser

Screenshots Ray-2023-12-03-000068@2x

Desktop (please complete the following information):

philipmclifton commented 7 months ago

I am also experiencing this issue. Link is not clickable.

Nutickets commented 6 months ago

This one is really getting in the way of local email testing, I think this is a semi-recent issue as I recall our signed URLs working in ray previously.

jonneroelofs commented 4 months ago

I have just spent several hours debugging this issue before I came here to report it and found this issue. A fix would be most welcome!

In my case the '=' after signature is rendered as '?' breaking the signed Url.

Original dumped before the markdown is converted: image

Rendered in ray: image

Rendered in an actual email: image

Not sure if this is relevant but in my case these are transactional mails sent with spatie mailcoach v6.

1stevengrant commented 2 months ago

I wonder if this is what I'm running into with #907