Skip to content

Sanitize newlines in QR serialized text fields - #121

Merged
Owen-Morgan825 merged 1 commit into
mainfrom
fix/sanitize-newlines-in-qr-output
Apr 28, 2026
Merged

Sanitize newlines in QR serialized text fields#121
Owen-Morgan825 merged 1 commit into
mainfrom
fix/sanitize-newlines-in-qr-output

Conversation

@luanzeba

@luanzeba luanzeba commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

Scouts sometimes press Enter in text fields (especially Comments), which adds newlines to the QR payload and causes spreadsheet scans to break into extra rows.

This change sanitizes serialized field values in src/components/QR/QRModal.tsx by replacing \r\n, \r, and \n with spaces before encoding/copying QR data.

The data still shows up with \n in the commit modal, but when you click "Copy Data" it sanitizes that out.

CleanShot 2026-04-22 at 12 12 36@2x CleanShot 2026-04-22 at 12 16 22@2x

@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://FRC2713.github.io/QRScout/pr-preview/pr-121/

Built to branch gh-pages at 2026-04-22 16:05 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@luanzeba
luanzeba requested a review from Owen-Morgan825 April 22, 2026 16:18
@Owen-Morgan825

Copy link
Copy Markdown
Contributor

Looks good to me.

@Owen-Morgan825
Owen-Morgan825 merged commit 581ad2e into main Apr 28, 2026
1 check passed
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