quotient-im / Quaternion

A Qt-based IM client for Matrix
https://matrix.org/ecosystem/clients/quaternion/
GNU General Public License v3.0
637 stars 108 forks source link

Check for image MIME data before HTML data #868

Closed chmeeedalf closed 1 year ago

chmeeedalf commented 1 year ago

Copying an image from Firefox attaches some HTML to the image. Extracting the plain text from the HTML before the image results in empty data in the field, with no image, triggering an assertion failure on message send.

This is a partial fix for issue #867. Partial, because the resulting image does not appear in the chat window until relaunching, due to an error opening the temp file created by this.