Gnome Terminal "Copy As HTML" produces deprecated HTML5 font elements
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNOME Terminal |
Fix Released
|
Unknown
|
|||
gnome-terminal (Debian) |
New
|
Undecided
|
Unassigned | ||
gnome-terminal (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
If you highlight text in gnome-terminal and right-click it, you get a "Copy as HTML" option. The HTML that gnome-terminal generates when using that feature contains <font> tags. font tags were depreciated in HTML 4.01, and made obsolete entirely in HTML 5. (See: https:/
Attached is a sample of the HTML generated by gnome-terminal.
The correct behavior would be to include style info such as font colors inside the "style" attribute of a <span> tag, rather than using <font> tags. That is to say,
<font color="#ffffff">
should be replaced by
<span style="color: #ffffff">,
and
</font>
should be replaced by
</span>
This bug exists in gnome terminal through version 3.38.1-1ubuntu1, and it exists in Ubuntu 21.04 as well as in prior versions of Ubuntu.
I've attached both a copy of the output of Copy As HTML, containing the deprecated <font> tag. Below is a fixed version of this output that doesn't rely on the <font> tag:
<pre><span style="color: #4E9A06"
<span style="color: #4E9A06"
<span style="color: #3465A4"
<span style="color: #4E9A06"
<span style="color: #3465A4"
<span style="color: #4E9A06"
</pre>
summary: |
- Gnome Terminal "Copy As HTML" produces HTML containing depreciated - features + Gnome Terminal "Copy As HTML" produces deprecated HTML5 font elements |
Changed in gnome-terminal: | |
status: | Unknown → Fix Released |
Status changed to 'Confirmed' because the bug affects multiple users.