sinclairnick / brail

💌 Transactional email that feels different
https://brail.dev
Apache License 2.0
258 stars 6 forks source link

Unexpected leftover tags in brail-rendered html #35

Open cswn opened 9 months ago

cswn commented 9 months ago

Hi there, I'm using brail to generate emails with dynamic data and recently I've noticed that there are some leftover html tags that find their way into the emails (tested in various email clients). See attached photos. However, when I pipe the rendered html to an index.html file locally and look at that in a browser, the html looks just fine. On our server, the html is instead fed into a text file which is then read out and sent as an email with php. This is only happening in one area of my jsx brail code:

<Column width={80}>
    {Object.values(props.mostRecentData).map((data) => {
        return (
                <Typography key={data} fontSize={14} as="td" paddingBottom={10}>
                     {data}
                </Typography>
        );
    })}
</Column>

Currently 2 out of 20 emails (each with different data) have this issue. Those are the ones in the images below. For reference, props.mostRecentData is an object with type { [index: string]: string }

I am not 100% sure this is a brail bug, but maybe someone has had the same issue and can help me figure out what is causing this problem anyway. Thanks in advance!

image image