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

feat: toggle html interpretations #57

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ZachHaber
Copy link
Contributor

πŸ”— Linked issue

#56

❓ Type of change

  • 🧹 Updates to the build process or auxiliary tools and libraries
  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸš€ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Resolves #56

This adds an enableHtmlInterpretation setting which prevents the string body/icon from being interpreted as html. As mentioned in the issue, I've set it to default to true for now, but should be switched to false along with the next breaking changes in the library.

The main thing I was unsure of is the icon. I feel like in general, someone is far less likely to pass a user defined string into the icon field of the toasts than the body. Specifically, I have currently disabled the string form of the icon from being treated as html, but I didn't change the Icon object form of the icon. With the addition of JSX earlier, should the object form be deprecated?

Feel free to adjust the name of the setting or the readme changes/jsdoc for it if needed.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

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

Successfully merging this pull request may close these issues.

Option to prevent treatment as html
1 participant