HarshithGamini opened a new issue, #33970: URL: https://github.com/apache/superset/issues/33970
### Bug description ### **Bug:** Using the CSS Template editor in Apache Superset throws a runtime error and fails to apply the template when a CSS block is added that includes invalid syntax — particularly CSS-like content inside template blocks or strings that mimic selectors. ### **Environment:** - OS: Windows 11 with WSL2 (Ubuntu 22.04), MacOS Sequoia. - Superset Version: 0.0.0-dev (built from latest master). - Install Method: Forked the repository, cloned it and running via Docker. - Browser: Chrome. ### **Steps to Reproduce:** - Go to a new Dashboard -> Edit CSS -> Load a CSS Template - Uncaught Runtime error as the above image. The app crashes with a runtime error due to invalid CSS being interpreted as a DOM selector via querySelector. ### **Additional Context:** The bug arises because the key used in the Ant Design <Menu> component was incorrectly set to template.css, which is the full CSS string. When passed as a key, this raw CSS gets misused — especially when the string contains selector-like syntax. This causes the querySelector in the frontend to interpret it as a DOM selector, leading to a runtime crash. ### Screenshots/recordings  ### Superset version master / latest-dev ### Python version 3.10 ### Node version 18 or greater ### Browser Chrome ### Additional context _No response_ ### Checklist - [x] I have searched Superset docs and Slack and didn't find a solution to my problem. - [x] I have searched the GitHub issue tracker and didn't find a similar bug report. - [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
