Gnome Terminal "Copy As HTML" produces deprecated HTML5 font elements

Bug #1938605 reported by Alecto Irene Perez
14
This bug affects 3 people
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://developer.mozilla.org/en-US/docs/Web/HTML/Element/font).

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"><b>alecto@styx</b></span>:<span style="color: #3465A4"><b>~</b></span>$ ls apps
<span style="color: #4E9A06"><b>Bitwarden-1.27.1-x86_64_a6df18330216c2546e435c5a9c5df432.AppImage</b></span>
<span style="color: #3465A4"><b>gitkraken</b></span>
<span style="color: #4E9A06"><b>session-desktop-linux-x86_64-1.6.7_18e4489c1ba2c40986ad03ca6522e187.AppImage</b></span>
<span style="color: #3465A4"><b>sources</b></span>
<span style="color: #4E9A06"><b>alecto@styx</b></span>:<span style="color: #3465A4"><b>~</b></span>$
</pre>

Tags: gnome
Revision history for this message
Alecto Irene Perez (codeinred) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-terminal (Ubuntu):
status: New → Confirmed
wontfix (wontfix)
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
Revision history for this message
wontfix (wontfix) wrote :

Fix was not released upstream. It was reverted.
https://gitlab.gnome.org/GNOME/vte/-/issues/2604
https://gitlab.gnome.org/GNOME/vte/-/issues/2625
GNOME is holding back standards compliance because of the current Matrix Protocol.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.