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

Adds failing test for escaping CSS error messages #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kennethormandy
Copy link
Collaborator

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.

@kennethormandy
Copy link
Collaborator Author

Might be more helpful: mathiasbynens/cssesc

@Munter
Copy link

Munter commented Jan 17, 2017

I abstracted the display of a CSS error message into a stand alone npm module: https://www.npmjs.com/package/csserror

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