Jump to content

Copy & Pasting image data into a forum post using Firefox creates "(null)" text after posting


Recommended Posts

Posted

When inserting an image from the clipboard into the textbox of a forum post, a little blank square is inserted instead and the image uploaded as an attachment. When you do not delete that little square thing from the text and post, then the text "(null)" is inserted in it's place.

This happens with Firefox 110.0 (64 bit) on Windows and earlier versions as well.

  • Like 1
Posted

It's been like this for a long time now with Chrome and Edge too.
It started happening when the image stopped showing in the text field.
If you edit the post after posting images show correctly, and you can remove the 'null'.

Sent from my MAR-LX1A using Tapatalk

Posted

Do you use the insert button that shows up in the attachments window? This inserts your image as an image, otherwise the forum tries to insert it as text.

  • Like 1

Awaiting: DCS F-15C

Win 10 i5-9600KF 4.6 GHz 64 GB RAM RTX2080Ti 11GB -- Win 7 64 i5-6600K 3.6 GHz 32 GB RAM GTX970 4GB -- A-10C, F-5E, Su-27, F-15C, F-14B, F-16C missions in User Files

 

Posted
Do you use the insert button that shows up in the attachments window? This inserts your image as an image, otherwise the forum tries to insert it as text.
Ah, that's interesting. Before it just worked with simple paste. Gotta try that, thanks.

Sent from my MAR-LX1A using Tapatalk

Posted

Ha! So it's a browser thing? I've been wondering for a couple of last months why some posts on this forum have lots of "nulls" and "nullnulls" in them for no logical reason and started thinking maybe there's some new stupid internet "fashion" going on that I, certified boomer, am not aware of 😄

  • Like 2

i7 9700K @ stock speed, single GTX1070, 32 gigs of RAM, TH Warthog, MFG Crosswind, Win10.

  • 3 months later...
Posted

Just looking at the DOM from the editor, after Copy and Pasting an image into the editor, a series of deeply nested HTML tags gets created, of which one is an <img> tag that certainly has to do with the problem:

<img class="pastedImagePlaceholderm7th7k cke_widget_element" [lots of stuff omitteddata-cke-saved-src="null">

When setting the data-cke-saved-src attribute to another value, say, "foobar", and then using the preview function, the post is prefixed with "foobar" instead of "null".

Not knowing the JavaScript code behind this whole thing, I would assume that just setting data-cke-saved-src="" or checking its content for being == "null" and then discarding its content might be a quick workaround.

It's a bit odd, seeing all these "null" showing up in posts all over the place, and kind of understandable, given that the forum editor doesn't show them, they only appear after posting (or when using the preview, which I assume hardly anyone even knows exists).

  • Like 1
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...