question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash when formatting a string containing CSS

See original GitHub issue

Hi,

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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
davidchamberscommented, Apr 18, 2018

Three cheers for projects without dependencies! 🎉

0reactions
julien1619commented, Apr 18, 2018

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found