caoranach / DiscordConnect

This is a FoundryVTT module designed to mirror Foundry chat to a Discord channel.
5 stars 11 forks source link

When posting an image to FVTT chat it does not transfer the image to discord correctly #17

Open Antagnostic opened 1 year ago

Antagnostic commented 1 year ago

What happens in Foundry VTT: An image is posted to chat from an image journal entry:

image

What is posted to Discord: <img class="ddbimporter-chat-image" data-src="https://basepath.dev/D&amp;D/subpath/006-00-007.butterfly.png" src="https://basepath.dev/D&amp;D/subpath/006-00-007.butterfly.png" />

There are two issues here, one is that it posts the html instead of just a link to the image, and two, the image link has an ampersand in it, when clicked in discord it doesn't resolve because of this.

What would be expected: Post the unescaped url so that discord could render the image in the discord chat or the users could at least click the link to open the image in a browser.