0

Remotely similar to Exclamation Point Randomly In Result of PHP HTML-Email

In the rails application I am working on, most emails are being parsed by slim. There was no problem until people started noticing injected exclamation marks in their emails. Was wandering if slims magic generates large strings without new lines that confuse the mailer parsers and how can that me mitigated?

Community
  • 1
  • 1
Dimitrios Mistriotis
  • 2,626
  • 3
  • 28
  • 45

1 Answers1

0

After some investigation:

Slim could be configured to operate in "pretty" mode, but that would have the side-effect of producing too many spaces for the web consumers of the application. Also slim does not allow you to conditionally have "pretty" or "ugly" per template.

Sticking with ugly mode, there is the production of ultra long strings, which create the issue above.

There could be an array of options on tackling this, but the easiest one was to re-write emails in ruby's ERB, and keep that for email communication.

Dimitrios Mistriotis
  • 2,626
  • 3
  • 28
  • 45