Wikis where an admin customised the invitation message template keep their own version on upgrade, as usual for XAR content. To get the fix, they need to apply the same change to their template: escape the message, then replace \r?\n with <br/>.
The plain-text template messageBodyTemplatePlain isn't used: the text part of the invitation mail is always set to an empty string. Plain-text mail clients therefore get no readable body. This could be a separate issue if it's worth fixing.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.