Apple Messages strips URL from HTML clipboard

Hi there, I use the Clipboard API to create formatted project links with a "copy link" button. This has been really versatile for end users. When they paste into their email, they get a hyperlinked project name that leads to the project, and when they paste into the URL bar, they just get the project URL.

It used to be that pasting into Messages on Mac would yield the same behavior as pasting into the URL bar. But recently, Messages started only pasting the inner text of the HTML clipboard, so no URL, just the project name, which isn’t very useful for a copy link function.

Is there any way to ensure that Messages pastes the URL while maintaining my formatting options on other surfaces?

Apple Messages strips URL from HTML clipboard
 
 
Q