Bug 25249

Summary: Firefox not pasting non-breaking spaces (upstream bug #359303)
Product: Mageia Reporter: Davy Defaud <davy.defaud>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: Normal CC: fri, ouaurelien
Version: 7Keywords: Triaged, UPSTREAM
Target Milestone: ---   
Hardware: All   
OS: Linux   
URL: https://bugzilla.mozilla.org/show_bug.cgi?id=359303
Whiteboard:
Source RPM: firefox-68.0-1.1.mga7.src.rpm CVE:
Status comment:
Attachments: Remove non-breaking spaces conversion when pasting text into a form field

Description Davy Defaud 2019-08-09 17:53:04 CEST
There’s a really bad behaviour of Firefox when pasting a text containing non‐breaking spaces (&nbsp;): these special characters are converted
into normal spaces. That’s completely useless considering that the thin
spaces (&thinsp;) are not converted!

The problem has been reported upstream as bug #359303 thirteen years
ago, and it’s still not fixed! Actually, it is considered to be a “feature”! I think that nowadays it’s rather a very annoying bug. I can enter this special space with my keyboard in a text field, but I can’t paste a text containing it in the same field ; and if I paste something containing a thin space, it works. What a strange design!

All Firefox versions are concerned.

Steps to Reproduce:

1. copy a document containing non-breaking [ ] and thin spaces [ ], for example from Gedit editor with the “Draw spaces” plugin activated (Gedit → Preferences → Plugins → Draw spaces, then click on Preferences button and check “Draw non-breaking spaces”), so you can see them;
2. select the text with the special characters, copy it and paste it in a Firefox form input (text or textarea);
3. now copy the pasted text form the Firefox input back to Gedit, you’ll see that non-breaking spaces have been replaced by normal spaces whereas thin spaces are still there.

The trivial patch here attached has been proposed. It would be nice to see this insane behaviour nuked a least from Mageia!
Comment 1 Davy Defaud 2019-08-09 17:55:42 CEST
Created attachment 11247 [details]
Remove non-breaking spaces conversion when pasting text into a form field
Comment 2 Morgan Leijström 2019-08-10 10:11:17 CEST
I think this is best done upstream.
I registered there just to express my support on the bug.

Davy, if you like to push this forward, maybe register at other distributions forums/bugzillas and see if you can get support, and make some people express upstream.

That must be much more appealing than every distro patching Firefox, which i read is not trivial, plus delays every update from distro and makes more work.

Thank you for bringing this up.

CC: (none) => fri
Keywords: (none) => UPSTREAM

Comment 3 Davy Defaud 2019-08-10 12:15:22 CEST
Thank you for your support Morgan.

Of course this *has* to be fixed upstream rather than per distro (and even outside the GNU/Linux ecosystem). But after 13 years, I’m really pessimistic about me being persuasive enough…
Comment 4 Aurelien Oudelet 2020-08-23 16:36:19 CEST
Hi, thanks for reporting this bug.

Upstream bug. Annoying despite 14 years of report. Seems we can't fix this by ourselves.

Closing this.

CC: (none) => ouaurelien
Resolution: (none) => WONTFIX
Status: NEW => RESOLVED
Keywords: (none) => Triaged