Crash when formatting a string containing CSS
See original GitHub issueHi,
I have a problem when using this library with an email I try to format. My workflow is the following:
MJML email containing variable to be formatted -> Generated HTML email file with variable -> Just before sending it, I replace all variables using string-format
.
This email contains some CSS code and more specifically, this: { width:100% !important; }
. I think the new version of string-format
interprets it wrongly and tries to apply a transformer, which is unknown, causing a complete crash of my node application.
For now, I will downgrade the library to keep it usable.
Here is a partial stack trace:
/opt/app/node_modules/string-format/index.js:53
throw ValueError('no transformer named "' + xf + '"');
Thank you!
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
String.Format failing on style section of HTML Email Template
Format to crash (or the bodybuilder, I'm not sure exactly which one has the issue, it fails at string.format). <style type="text/css"> #outlook ...
Read more >Be Careful What You Log — It Could Crash Your App
If the input to your logs is formatted in a certain way, your app can crash. When logging variables, you can use kotlin's...
Read more >Handling common HTML and CSS problems - MDN Web Docs
Note: One common problem with CSS and HTML arises when different CSS rules begin to conflict with one another. This can be especially ......
Read more >JavaScript Crash after Editing "F"-formatted cell - Infragistics
I have a bound WHDG that has a cell formatted in the following way: ... Inspection of the point of failure shows a...
Read more >EXPLOITING FORMAT STRING VULNERABILITY
If we pass beyond the buffer it gets crashed. But if we pass string with format values, it gives us the random stack...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Three cheers for projects without dependencies! 🎉
Ok, I think you’re right, maybe I should move to an HTML template library. I really hope to find one without any dependency just like yours, and it’s rare enough to be underlined and supported 😉 Thank you anyway!