fix: quote tag labels containing spaces or commas#1782
Open
jacalata wants to merge 3 commits into
Open
Conversation
The server's TagUtil.parseTags splits unquoted labels on spaces and commas, causing tags like "Yearly Sales" to be stored as two separate tags. Wrapping labels in double quotes prevents the split; the server strips the quotes before storing. Fixes #1738 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Tableau server splits unquoted tag labels on spaces and commas (via TagUtil.parseTags), so "Yearly Sales" becomes two tags "Yearly" and "Sales". Wrapping labels in double quotes prevents the split; the server strips the quotes before storing. Also adds the first e2e test infrastructure to the repo: - test_e2e/ directory with a session-scoped server fixture reading credentials from env vars (TABLEAU_SERVER, TABLEAU_SITE, TABLEAU_TOKEN, TABLEAU_TOKEN_NAME, TABLEAU_PROJECT) - test_e2e/test_tagging.py validates the tag quoting fix against a real Tableau server - contributing.md documents how to run unit and e2e tests Fixes #1738 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
TagUtil.parseTagssplits unquoted labels on whitespace and commas; wrapping labels in double quotes prevents the split, and the server strips the quotes before storing. (Fixes add_tags() treats spaces in a tag as delimiter resulting in multiple tags #1738)#,+,/, space) silently failing or returning 404.urllib.parse.quotewas called with the defaultsafe='/', leaving#unencoded — causing the server to interpret it as a URL fragment. Fixed by usingsafe=''to encode all special characters. (Fixes Delete tag with special characters like '#' does not work #675, Fixes Problem with changing tags which contains '.' - 404007: Resource Not Found #994)test_e2e/), with a session-scoped fixture reading credentials from env vars and tag round-trip tests validated against a real Tableau Online server.Test plan
pytest(existing + new tests intest/test_tagging.py)pytest test_e2e/validated against Tableau Online (seecontributing.md)🤖 Generated with Claude Code