Skip to content
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

Sqllab UI regession in 3.0.0 where it's not displaying certain string values #25561

Open
3 tasks done
zhaorui2022 opened this issue Oct 6, 2023 · 7 comments
Open
3 tasks done

Comments

@zhaorui2022
Copy link
Contributor

After we upgraded to 3.0.0, we have received user reporting query results not rendering in sqllab results. I have checked the api call results in network tab and can confirm the correct value has been returned from the backend database. So this seems like an issue with front end.

How to reproduce the bug

  1. Go to Sqllab, select any database (I tested this on Presto and MySQL)
  2. Run SELECT '<abcdef:12345>' as test_str
  3. Run the query
  4. See error

Expected results

String values rendered as in 2.0.0

Actual results

String values not being rendered

Screenshots

If applicable, add screenshots to help explain your problem.

Screenshot 2023-10-06 at 3 09 52 PM

Screenshot 2023-10-06 at 3 10 06 PM

Environment

(please complete the following information):

  • browser type and version: Chrome latest stable version
  • superset version: superset version 3.0.0
  • python version: python --version3.9
  • node.js version: node -v v20.8.0
  • any feature flags active: N/A

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Add any other context about the problem here.

@zhaorui2022 zhaorui2022 changed the title Sqllab UI regession where it's not displaying certain string values Sqllab UI regession in 3.0.0 where it's not displaying certain string values Oct 6, 2023
@zhaorui2022
Copy link
Contributor Author

I have taken a look at the code but don't have a clue due to lack of front end code knowledge. @justinpark Do you happen to know what the problem might be?

@bkyryliuk
Copy link
Member

probably related code:

return isProbablyHTML(htmlString) ? sanitizeHtml(htmlString) : htmlString;

See:


Effectively it removes all it thinks is html.

@rusackas
Copy link
Member

This is still happening on current master. We're open to proposals/PRs to fix this.

@rusackas
Copy link
Member

Noting that in the chart builder, unchecking HTML rendering doesn't fix the issue there either.
image

@rusackas
Copy link
Member

I know @mistercrunch has looked at some of this HTML rendering business, just in case he sees any obvious solution here

@mistercrunch
Copy link
Member

mistercrunch commented Oct 30, 2024

Recent related feature -> #27969, so it looks like it can be switched off, but given the issue here, better/smarter html detection could help as well. For SQL Lab specifically looks like the flag lives there superset-frontend/src/utils/localStorageHelpers.ts, but idk how these flags get set/managed (?)

@mistercrunch
Copy link
Member

For the record I think this is the area that would need to be improved if we wanted to be smarter around detecting html -> https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-core/src/utils/html.tsx#L43-L45

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

No branches or pull requests

4 participants