(Please let me know if there is a more appropriate forum for this; I did my best to research first. At the moment, I don't know if it's a Windows, browser, or Gmail bug.)
EDIT -- SOLVED: As thkang suggested, disabling add-ons made the problem go away. Stepwise re-enabling identified the "Table of contents" plugin as the culprit. This is a huge relief for me -- thanks for your help. I'll leave the question up in case anyone else is combining Gmail and Table of Contents, but have removed information that turned out to be irrelevant.
Using the "reply" function in Gmail sometimes inserts the text "Close" at the end of my message, either right away or after I press "send". The text is a link with an empty target (unless I use plain text mode, which I generally do). The bug has been with me for months now, but after Gmail's recent switch to a new look and feel for "reply", the "Close" link now sometimes appears as a black rectangle that overlaps the text of my reply.
I always believed this to be a Gmail bug. However, today I saw the same thing when pasting from my plaintext editor (PSPad) into a non-Gmail Firefox tab (some web chat). I pasted "some text" from my editor into the chat edit box, clicked "send" in the chat window, and this is what got posted in the chat:
some text <a target="_blank" >Close <ul />
That last line only appeared after I clicked "send", similarly to how the bug manifests after I click "send" in Gmail. However, it never happened again during the chat, when I was typing directly into the chat edit box instead of pasting.
The unclosed "a" tag and empty "ul" might well explain why this messes up formatting in the new pop-out reply box in Gmail. However, I see only a very remote connection between the chat and Gmail, namely that a Gmail background tab was open in Firefox at the same time as the chat. Any help in sorting this out would be greatly appreciated.
This is on 64-bit Windows 7, Firefox 17.0.8 with Table of Contents 1.2.3. (EDIT: Removed list of extensions that were proven innocent.)
I would appreciate any help on sorting this out, because it makes me appear confused and/or rude to my contacts... ("Best regards! Close")