Adds failing test for escaping CSS error messages #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Progress on sintaxi/harp#35.
This test doesn’t entirely cover the problem. Basically, messages in CSS
content
must have quotes escaped as\"
, and should also have special characters like…
(which is: …) escaped as Unicode like this:\2026
. If that doesn’t happen, the CSS will be invalid and the error messages can easily get cut off.So, I’m not entirely sure if the fix belongs in Terraform, Harp, or the future error view module. It might make sense that the error messages would be escaped in Terraform, but the only reason they’d need to be escaped this way is because they appear in CSS. The only thing determining that is Harp, so maybe this belongs there for now and the other module in the future. I had already made the test when this occurred to me, so here we are.