Support for escaping HTML
See original GitHub issueSweetalert2 seems to have changed the html
config option to no longer signal whether HTML should be escaped. This opens up the prospect of XSS attacks on user-supplied strings being used in Sweetalert2 dialogues. I’d like to propose adding a new config option escapeHTML
that will behave the same as the original sweetalert html
option, namely escaping HTML from the title and description.
I’m happy to open a PR if this is a feature you’d be open to adding. Also, if I’m mistaken about there not being an option for escaping HTML, please let me know 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Which characters need to be escaped in HTML?
In some cases it may be safe to skip escaping some of these characters, but I encourage you to escape all five in...
Read more >Free Online HTML Escape / Unescape Tool - FreeFormatter.com
A free online tool to escape or unescape HTML documents and files. ... Consult the HTML Entities page for a full list of...
Read more >Escape HTML (instance security hardening)
A malicious user can inject HTML code within the form field to execute unwanted scripts on different client/user sessions. Set this property to ......
Read more >HTML Escape Online Tool - LambdaTest
This tool will convert a string to HTML entities or convert HTML entities to plain text.
Read more >Using character escapes in markup and CSS - W3C
Character escapes are a way of writing a character in markup using only ASCII code points. They are useful if you are unable...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@akarelas That is what this issue is about. After issue fixed vs. before issue fixed.
Introducing
titleText
seems fine to me.