mysociety / writetothem

Write to your MP, MEP, & other elected representatives.
https://www.writetothem.com
Other
54 stars 11 forks source link

Formatting mismatch between message preview and confirmation email #438

Closed denizgenc closed 1 year ago

denizgenc commented 4 years ago

Hi, I wrote a letter that had a "bulleted list" using dashes that looked something like this:

A paragraph

Some text:
- Item one
- Item two
- Item three

When I clicked the preview button on the website, each line was separate:

A paragraph

Some text: - Item one - Item two - Item three

This was what I expected so I clicked send. The confirmation email, however, bunched up all lines that weren't seperated by a blank line (as if it was parsed as Markdown):

A paragraph

Some text: - Item one - Item two - Item three

This is clearly not what I want to send, so I had to reformat the letter by putting blank lines between each line that should have been separate.

I am not sure how the message is ultimately formatted, but it would probably be for the best if the web preview and the email confirmation preview matched up. Can this be fixed?

dracos commented 1 year ago

Sorry for the delay in looking at this. It looks like we put identical text in both the text and HTML parts of the confirmation email, so yes, any whitespace there is being treated as one space in the HTML. We don't send HTML email for the representative email, only text, so it is/would be okay there (and match the on-site preview) - it is only the confirmation email HTML part that is displaying incorrectly. Should be able to resolve that by doing whatever the on-site preview does to the HTML part of the confirmation email also.

denizgenc commented 1 year ago

Thank you so much for looking into this! I'd totally forgotten about it. Appreciate the fix.