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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic sanity tests for sanitizeHTML #6247

Merged
merged 2 commits into from
Mar 30, 2020

Conversation

johnwcallahan
Copy link
Contributor

@johnwcallahan johnwcallahan commented Mar 25, 2020

Description

Original discussion here: #6227 ... @Jskobos this is pretty much what you suggested. 馃槅

I still think it's valuable to have these three tests, which confirm:

  • We're escaping non-whitelisted tags.
  • We're stripping non-whitelisted attributes.
  • We're stripping invalid "href" values.

The specific string tests have been removed, as they are noisy and probably fall in the category of "testing the library". With these basic tests I'm proposing, we verify that sanitization is working, and not much else about implementation.

@johnwcallahan johnwcallahan self-assigned this Mar 25, 2020
@johnwcallahan johnwcallahan merged commit 4b5096b into linode:develop Mar 30, 2020
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.

None yet

2 participants