terraform icon indicating copy to clipboard operation
terraform copied to clipboard

Adds failing test for escaping CSS error messages

Open kennethormandy opened this issue 12 years ago • 2 comments

Progress on https://github.com/sintaxi/harp/issues/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 avatar Oct 13 '13 19:10 kennethormandy

Might be more helpful: mathiasbynens/cssesc

kennethormandy avatar Oct 20 '13 02:10 kennethormandy

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

Munter avatar Jan 17 '17 08:01 Munter