spatie / ray

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

query params with name starting with `reg` are incorrectly interpreted as HTML `&reg` entities #925

Open ceilidhboy opened 2 weeks ago

ceilidhboy commented 2 weeks ago

Describe the bug With ray()->showHttpClientRequests(), URLs with query params with name starting with reg are incorrectly interpreted and displayed in Ray as the HTML registered trademark entity ® when they are not the first param.

This seems to be due to Ray interpreting &reg in the URL as an HTML entity

For example, the query https://fubar.com?foo=bar&regNo=1 is displayed as https://fubar.com?foo=bar®No=1

EDIT: The same error happens when calling ray->link(). Try ray()->link('https://fubar.com?foo=bar&regNo=1'); and you get the following screenshot

2024-06-19 13_43_44-Ray

Versions Ray version 2.8.1.0

PHP version: 8.2 Laravel version: 11.10.0

To Reproduce Steps to reproduce the behavior:

  1. ray()->showHttpClientRequests();
  2. Send an HTTP request with the query string ?foo=bar&regNo=1.

Expected behavior To see the query string displayed in Ray as ?foo=bar&regNo=1.

Screenshots 2024-06-19 11_47_32-Ray

Desktop (please complete the following information):