-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Expression name containing brackets ([ or ]
) can break the UI
#15316
Comments
confirming different-but-same brokenness for parens |
This is currently the limitation of the lexer used in the Chevrotain-based parser, it does not understand a field reference that contains brackets or parentheses or other special characters (which must be escaped), e.g. |
Now that I think about this problem, maybe the solution is to prevent the use of these special characters as the name of any custom column. It's going to cumbersome anyway to use a name that has brackets, even if character escaping is supported. Thus, the plan is: if the custom column name contains one ore more special characters, show an error message and don't let the user continue. Does that sound like a good compromise? |
Doesn't this one affect non-custom columns too? Quote delimited columns in postgres can have anything - brackets, emoji... |
Describe the bug
When a Custom Expression uses a name containing brackets (
[ or ]
), then autocomplete dropdown stops working and forcefully trying to use that expression again in another expression will break the UI until browser refresh (or show "Something went wrong").To Reproduce
1 + 1
with the nameMyCC [2021]
Sum([
notice there's no field dropdownMyCC [2021]
master
, it will reset everything done in the Notebook and show "Something went wrong" in the lower-right corner)There are a lot of browser console errors
Information about your Metabase Installation:
Tested 0.38.2 and
master
Severity
Giving P2, since it breaks UI (or clears everything on master), even though it's an easy workaround - don't use brackets.
Are there other characters that could cause similar problem?
The text was updated successfully, but these errors were encountered: