Bulk invitation log message contains raw HTML and is in a code block

Once a set of invitations has been sent out in bulk, the message that’s sent as a result contains the log:

As you can see in the screenshot, it’s fenced in a code block, and apostrophes are being interpreted as the start/end of strings, so you get runs of red and runs of black.

Additionally, the log itself contains HTML to bold the email addresses and provide a link to the user summary page, but this is unparsed and thus not particularly useful, instead just adding noise.

I would suggest that the log be output as is or as a list, and the HTML either stripped or interpreted.

2 Likes

Normally we have

Here's the log:

```text

but @techapj omitted that in this case for some reason. I’ve added it back in.

This is all that is needed, anything else is up to @techapj

3 Likes

Good point. I sanitized the error log via:

https://github.com/discourse/discourse/commit/94683b33b815607abd39e2542db6c7dcf78e88c8

6 Likes