Skip to content

fix(basket): keep & in sanitized URLs so query parameters stay separate - #1135

Merged
izadoesdev merged 1 commit into
databuddy-analytics:stagingfrom
Adityakk9031:fix/basket-sanitize-url-keeps-ampersand
Oct 17, 2026
Merged

izadoesdev merged 1 commit into
databuddy-analytics:stagingfrom
Adityakk9031:fix/basket-sanitize-url-keeps-ampersand

Conversation

@Adityakk9031

@Adityakk9031 Adityakk9031 commented Oct 15, 2026 •

Copy link
Copy Markdown

Problem

sanitizeUrl reuses sanitizeString, which strips &. A tracked path such as /pricing?utm_source=x&plan=pro is stored as /pricing?utm_source=xplan=pro, which merges parameters and corrupts the stored path and referrer.

Fix

URLs now strip only <>'"; & is kept. sanitizeString behaviour is unchanged.

Tests

Added a sanitizeUrl case in validation.test.ts; the file passes under vitest.


Summary by cubic

Fixes sanitizeUrl so & is kept in stored URLs. It previously reused sanitizeString, which strips &, so /pricing?utm_source=x&plan=pro was stored as /pricing?utm_source=xplan=pro, merging query parameters and corrupting stored paths and referrers.

URLs now strip only <>'"; sanitizeString keeps stripping & as before. A test case was added to verify query parameters stay separate.

Written for commit a49620e. Summary will update on new commits.

View guided diff

sanitizeUrl reused sanitizeString, which strips &, so /pricing?utm_source=x&plan=pro
was stored as /pricing?utm_source=xplan=pro.
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
dashboard Skipped Skipped Oct 15, 2026 11:32am UTC
documentation Skipped Skipped Oct 15, 2026 11:32am UTC

@vercel
vercel Bot temporarily deployed to Preview – dashboard October 15, 2026 11:32 Inactive
@vercel
vercel Bot temporarily deployed to Preview – documentation October 15, 2026 11:32 Inactive
@vercel

vercel Bot commented Oct 15, 2026

Copy link
Copy Markdown

@Adityakk9031 is attempting to deploy a commit to the Databuddy OSS Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 1c0c8805-7d76-4b9c-a298-561cec33631d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

sanitizeUrl now keeps &, so stored URLs retain separate query parameters.

  • Tracked URLs keep their query parameters separate.

Reviews (1) · Last reviewed commit: "fix(basket): keep & in sanitized URLs so..." · Reviewed by Greptile

@izadoesdev
izadoesdev merged commit e108c84 into databuddy-analytics:staging Oct 17, 2026
12 of 13 checks passed

This branch was previously deployed

2 inactive deployments
Preview – documentation — a49620ee Deployed Oct 15, 2026 by vercel[bot]
Preview – dashboard — a49620ee Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants