Repository navigation
🐛 Fix ListFormat.tsv joining values with a literal \t - #2628
Open
ChandraChaan wants to merge 1 commit into
Open
ChandraChaan wants to merge 1 commit into
ChandraChaan wants to merge 1 commit into
Conversation
`_getSeparatorChar` returned the raw string `r'\t'` (a backslash and a `t`) instead of a tab, so tsv-formatted lists were never actually tab-separated. Use `%09` in query strings, like `ssv` uses `%20`, and a real tab otherwise. Closes cfug#2627 Co-Authored-By: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New Pull Request Checklist
mainbranch to avoid conflicts (via merge from master or rebase)ListFormat.tsvdoc already describes the fixed behavior)CHANGELOG.mdin the corresponding packageAdditional context and info (if any)
Closes #2627
ListFormat.tsvis documented as tab-separated, but_getSeparatorCharreturned the raw stringr'\t'(a backslash and at), so values were joined with those two characters instead of a tab. In query strings this put a raw backslash into the URL (a=foo\tbar); inurlEncodeMapit becamea=foo%5Ctbar.The separator is now a real tab:
%09in query strings (matching howssvalready uses%20there) and\totherwise, whichurlEncodeMapencodes to%09andFormDatakeeps as a raw tab.@AlexV525 calling this out because it changes request encoding on the wire for
ListFormat.tsvusers. Anyone currently relying on the literal\twould see real tabs instead, which is what the format is documented to produce.The three existing
tsvexpectations inencoding_test.dart(urlEncodeMaptsv and custom,urlEncodeQueryMapcustom) had captured the wrong output; they now expect%09and fail without this change.dart test -p vmindio/passes (253 tests; the TLS-tagged tests are skipped by the default preset), anddart formatanddart analyze --fatal-infosare clean.Implementation and tests by Claude (Anthropic); reviewed by me before submitting.