Bug 123085 - <time> tag not pasted / not recognized
Summary: <time> tag not pasted / not recognized
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:html
Depends on:
Blocks: HTML-Import
  Show dependency treegraph
 
Reported: 2019-01-31 11:38 UTC by rs
Modified: 2024-03-01 10:41 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document (589 bytes, text/html)
2019-01-31 11:43 UTC, rs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rs 2019-01-31 11:38:55 UTC
Description:
HTML content surrounded inside a <time> copied from the webbrowser will return nothing when pasted to a writer document. Could lead to some important and unnoticed data loss. 

Steps to Reproduce:
1. create a test.html file with the following: 
<html lang="en" dir="ltr" prefix="content: http://purl.org/rss/1.0/modules/content/  dc: http://purl.org/dc/terms/  foaf: http://xmlns.com/foaf/0.1/  og: http://ogp.me/ns#  rdfs: http://www.w3.org/2000/01/rdf-schema#  schema: http://schema.org/  sioc: http://rdfs.org/sioc/ns#  sioct: http://rdfs.org/sioc/types#  skos: http://www.w3.org/2004/02/skos/core#  xsd: http://www.w3.org/2001/XMLSchema# ">
  <head>
    <meta charset="utf-8" />
    <title>HTML time tag bug</title>
  </head>
  <body>
    <time datetime="1949-02-02T12:00:00Z" class="datetime">1949-02-02</time>
  </body>
</html>

2. open it in a browser and click Alt+AA (select all)
3. open a writer document and click Alt+V (paste)
4. change Options > Load/Save > HTML compatibility > Import unknown HTML tags as fields
5. try paste again. 
6. In the comments it shows the opening and closing tag proving that the pasted data did actually arrive (not a OS paste issue). 

Actual Results:
Nothing is pasted

Expected Results:
1949-02-02 is pasted


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Build ID: 1:6.1.3~rc2-0ubuntu0.16.04.1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: en-US (en_US.UTF-8); Calc: group threaded
Comment 1 rs 2019-01-31 11:43:23 UTC
Created attachment 148799 [details]
Test document
Comment 2 rs 2019-01-31 11:45:24 UTC
Pasted in a Calc cell will have the same result.
Comment 3 Julien Nabet 2019-02-01 08:24:03 UTC
Indeed, "time" isn't declared in https://opengrok.libreoffice.org/xref/core/include/svtools/htmlkywd.hxx?r=aad9c6da and so unknown as a html tag.
Comment 4 QA Administrators 2021-02-01 03:57:34 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2024-03-01 03:16:55 UTC Comment hidden (obsolete)
Comment 6 rs 2024-03-01 10:38:14 UTC
I can confirm that the bug is fixed for localc 7.4.7.2 and 24.2.1.2 in combination with the paste option "Detect special number (such as dates)". 

However in lowriter there is no such paste option and the date is simply not pasted in neither version. This confirms the experience described in the OP.
Comment 7 Julien Nabet 2024-03-01 10:41:28 UTC
Thank you for the feedback, let's put this one to WFM then.