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

Plot fails to sanitize invalid html strings #1923

Closed
rreusser opened this issue Aug 2, 2017 · 1 comment
Closed

Plot fails to sanitize invalid html strings #1923

rreusser opened this issue Aug 2, 2017 · 1 comment
Labels
bug something broken

Comments

@rreusser
Copy link
Contributor

rreusser commented Aug 2, 2017

See: https://codepen.io/rsreusser/pen/xLOPGv

Expected behavior:

  1. plot is created
  2. title is set to invalid string: "failure<sub>2</sub></sub>"
  3. plot is restyled to valid string: "success"
  4. plot has title "success"

Observed behavior:

As soon as the title is made invalid in step 2, further updates don't work.

@rreusser
Copy link
Contributor Author

rreusser commented Aug 2, 2017

Ohhhh, I was being really silly here. It rejects the promise. Switching that to catch makes it succeed. Facepalm. The problem in my real example was that it was in the react pipeline for me and I wasn't really handling errors so that it was react that blew up.

Nonetheless, I don't necessarily see why the svg text utils shouldn't just sanitize the input and do its best.

@rreusser rreusser changed the title Plot breaks unrecoverably on invalid html-style input Plot fails to sanitize invalid html strings Aug 2, 2017
@rreusser rreusser closed this as completed Aug 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

1 participant