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
this behaviour is known
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
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 backendsanitize
call, where the frontend call preserves the propertyasync
as-is, but the backend call adds the empty string to turn it intoasync=""
.Solution
This PR adds a short test for sanitization to ensure that
from the html spec, the 2 forms (
async
andasync=""
) 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