Bug 146711 - Writer pastes incorrectly when copying from HTML with the <time> tag (Linux-only)
Summary: Writer pastes incorrectly when copying from HTML with the <time> tag (Linux-o...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: HTML-Paste
  Show dependency treegraph
 
Reported: 2022-01-12 05:43 UTC by Ruben Molina
Modified: 2023-01-20 09:11 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ruben Molina 2022-01-12 05:43:17 UTC
Description:
Writer pastes incorrectly when copying from HTML with the <time> tag.

I copied some text from a web page that included the following HTML snippet:

(<time datetime="2022">2022</time>).

When I tried to paste the text on Writer, I got the following unexpected result:

().

However, using Paste Unformatted Text gives the expected result:

(2022).

I am using Version 7.2.3.2 (Ubuntu package, version 1:7.2.3-0ubuntu0.21.10.1). Localization: es-CO

Steps to Reproduce:
1. Copy text from a web page including the <time> tag
2. Paste onto Writer


Actual Results:
Text from the web page should be pasted on Writer

Expected Results:
The text in the <time> tag is pasted on Writer (is ignored).
Other text is pasted as expected.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version 7.2.3.2, Ubuntu package version 1:7.2.3-0ubuntu0.21.10.1, Localization es-CO
Comment 1 Ruben Molina 2022-01-16 15:04:58 UTC
I found the same issue with the <abbr> tag.

Copying from a web page containing this HTML snippet:

(<abbr title="Portable Document Format">PDF</abbr>)

Results in "()" rather than "(PDF)" when pasting onto Writer.

Additional Info:
Version: 7.2.3.2 / LibreOffice Community
Build ID: 20(Build:2)
CPU threads: 6; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: es-CO (es_CO.UTF-8); UI: es-ES
Ubuntu package version: 1:7.2.3-0ubuntu0.21.10.1
Calc: threaded
Comment 2 Dieter 2022-01-31 07:31:39 UTC
Would be nice, if you could add links to a webpage I can copy.
Comment 3 raal 2022-02-15 20:51:06 UTC
please see comment 2.
Comment 4 Ruben Molina 2022-02-16 01:06:30 UTC
[1] Go to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time and copy the contents of the output box.

It reads "The Cure will be celebrating their 40th anniversary on July 7 in London's Hyde Park." and "The concert starts at 20:00 and you'll be able to enjoy the band for at least 2h 30m."

Pasting it into Writer I get "The Cure will be celebrating their 40th anniversary on in London's Hyde Park." and "The concert starts at and you'll be able to enjoy the band for at least ."

[2] Go to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr and copy the contents of the output box.

It reads "You can use CSS to style your HTML."

Pasting into Writer I get "You can use to style your ."
Comment 5 QA Administrators 2022-02-16 03:36:44 UTC Comment hidden (obsolete)
Comment 6 Dieter 2022-02-16 07:13:06 UTC
Ruben, thank you for the links. I can't confirm it with

Version: 7.3.0.3 (x64) / LibreOffice Community
Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

At https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time I've copied "The concert starts at 20:00." and "The concert took place on May 15." from the the output boxes and pasted it in Writer. Time and date are displayed.

At https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr I've copied "Using CSS, you can style your abbreviations!" from the result box and pasted it in writer. Whole sentece is displayed.

So perhaps only a problem in Linux? You can also try it with LO 7.3
Comment 7 Suthagar 2022-07-05 03:07:43 UTC Comment hidden (no-value)
Comment 8 Buovjaga 2023-01-20 09:11:50 UTC
Indeed, there is no problem on Windows, but testing on Linux with various older versions back to 3.5.0 I see the issue. Not dependent on UI backend.

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4c06cfcd13195e9e996bc09dbee2dcac1c5e8ed2
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 20 January 2023