[Linux/Gtk] Firefox fails to paste text/html mime if content="text/html; is missing
Categories
(Core :: Widget: Gtk, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: stransky, Assigned: stransky)
References
()
Details
Attachments
(3 files)
Firefox fails to paste text/html mime if there are text/plain formats in clipboard on Linux/Gtk.
Assignee | ||
Comment 1•5 years ago
|
||
Downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1855084
Assignee | ||
Comment 2•5 years ago
|
||
echo '<b>Bold</b><i>Italics</i>Plain' | wl-copy --type text/html
puts those targets at clipboard:
$xclip -o -t TARGETS
text/x-moz-url-priv
text/plain
text/plain;charset=utf-8
STRING
TEXT
COMPOUND_TEXT
UTF8_STRING
text/_moz_htmlinfo
text/_moz_htmlcontext
text/html
TARGETS
TIMESTAMP
echo '<b>Bold</b><i>Italics</i>Plain' | wl-copy
puts those targets at clipboard:
[komat@localhost ~]$ xclip -o -t TARGETS
text/plain
text/plain;charset=utf-8
STRING
TEXT
COMPOUND_TEXT
UTF8_STRING
TARGETS
TIMESTAMP
so the clipboard contains plain text along the html and other formats.
Assignee | ||
Comment 3•5 years ago
|
||
It does not work because there's missing content="text/html; field so we failed to convert it at ConvertHTMLtoUCS2(). Maybe other applications (Chrome, OpenOffice) are not so strict and don't request the metadata.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
- Fallback to utf-8 when charset is not set for text/html.
- Move GetHTMLCharset() call out of ConvertHTMLtoUCS2() and use charset param there.
- Make GetHTMLCharset()/ConvertHTMLtoUCS2() return bool.
Depends on D84492
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D84493
![]() |
||
Comment 8•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/af66e1ce7d9d
https://hg.mozilla.org/mozilla-central/rev/a32f54d0690c
https://hg.mozilla.org/mozilla-central/rev/955f20019d71
Description
•