This has nothing to do with the fact that signal is based on electron. Whatsapp has a very similar client and it works perfectly with the mentioned snippets. Both copy and paste work flawlessly.
The theory there is that apps that are not HTML webapps in an Electron wrapper are less likely to have HTML encoding bugs in fields that shouldn't be parsing HTML special characters < > & because native apps wouldn't have HTML anywhere in their dependencies at all.
I think I agree that Electron apps are more likely to have HTML escaping bugs, but I've also rarely seen native iOS apps have HTML escaping bugs, so clearly neither vulnerability nor resilience are guaranteed.
Element (Riot) supports markdown, including markdown code blocks which are really handy for situations like this. You can even have syntax highlighting.
copy paste of
becomes idiocy in slack.These apps try to be too smart sometimes.
I wish for a plain textbox, and add smarts to the browser. I saw there's a firefox plugin that lets you edit all your textboxes in actual emacs.