GoogleChrome / lighthouse-ci

Automate running Lighthouse for every commit, viewing the changes, and preventing regressions
Apache License 2.0
6.34k stars 635 forks source link

URL being processed differently than url-replacement configuration #917

Open grainnecasey opened 1 year ago

grainnecasey commented 1 year ago

Describe the bug URLs are being normalized/replaced differently than the url-replacement configuration dictates, specifically when the URL contains a $

For example, we submitted this URL to lighthouse: https://www.gobrightline.com/press-room/brightline-awarded-$20,000-grant-by-operion-lifesaver--continue-award-winning-buzz-boxx-campaign

and received back this one: https://www.gobrightline.com/press-room/brightline-awarded-0,000-grant-by-operion-lifesaver--continue-award-winning-buzz-boxx-campaign

Even when submitting the URL in single quotes, or escaping the $ character, this substitution occurs.

Is there a way to properly escape the $ character so this will not happen?

To Reproduce Submit a URL to Lighthouse that contains a $ using the following command: lk-cli8 run 'https://www.gobrightline.com/press-room/brightline-awarded-$20,000-grant-by-operion-lifesaver--continue-award-winning-buzz-boxx-campaign' 9876 fake.hubteam.com desktop --categories seo --audits cumulative-layout-shift interactive

Expected behavior $ symbols will not be seen as an argument when within a URL, or a way to escape them will be provided.

Logs/Screenshots If applicable, add LHCI logs or screenshots to help explain your problem.

Environment (please complete the following information): Version 6.3.0

Additional context Add any other context about the problem here.