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

test(markdown-fixtures): add a test for DOMPurify sanitization #703

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

seaerchin
Copy link
Contributor

@seaerchin seaerchin commented Apr 13, 2023

Problem

Right now, we have no tests for the behaviour of the sanitize function, which leads to some behaviour being potentially inconsistent.

This was observed in the frontend sanitize call vs the backend sanitize call, where the frontend call preserves the property async as-is, but the backend call adds the empty string to turn it into async="".

Solution

This PR adds a short test for sanitization to ensure that

  1. this behaviour is known
  2. that this behaviour doesn't affect functionality.

from the html spec, the 2 forms (async and async="") are equivalent and browser support for the async tag as a whole is wide (only edge support is at v12, others start at v1), so this shouldn't be an issue

@seaerchin seaerchin merged commit f292d6e into develop Apr 18, 2023
@seaerchin seaerchin deleted the chore/sanitization-test branch April 18, 2023 02:05
@alexanderleegs alexanderleegs mentioned this pull request Apr 20, 2023
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.

2 participants