Text pasted from MS Word into issue text area gets remapped to PNG upload

Summary

Text pasted into GitLab text areas (like this one) from Microsoft Word for Mac gets converted into an 'upload', e.g.

Hello

Steps to reproduce

  1. Create an MS Word document
  2. Write 'Hello' in it.
  3. Copy 'Hello' to the clipboard
  4. Create a GitLab issue
  5. Paste into the Description of the GitLab issue.

Watch as the text is mangled ...

Initially, the word appears like this:

{{Hello}}

It then gets replaced with a link like this:

[Hello](/uploads/8e68ffcabc4c52afaa42ea2f6fb63f17/Hello)

If I download what it's created, I find a PNG containing the word Hello:

/Users/mrg/Downloads/Hello: PNG image data, 468 x 15, 8-bit/color RGBA, non-interlaced

Example Project

The problem is reproducible here, in this project, by raising an issue or making a comment.

I was surprised not to find an existing issue for it, but perhaps it only affects certain versions of Word/macOS.

I'm using Word for Mac 16.16.16 on Catalina 10.15.1 (19B88), but I've seen this on earlier versions of both, and I think it affects Excel as well as Word.

What is the current bug behavior?

Pasted text is converted to an image upload.

What is the expected correct behavior?

Text is pasted as text.

Relevant logs and/or screenshots

Screenshot_2019-12-10_at_17.12.22

Output of checks

This bug happens on GitLab.com

Possible fixes

I assume there's some special handling in the Javascript for rich text pasted from the clipboard, but I haven't tracked it down.

Assignee Loading
Time tracking Loading