Download it now!
Bug 116049 - reference-mark-* tags stripped out in clipboard html
Summary: reference-mark-* tags stripped out in clipboard html
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium minor
Assignee: Not Assigned
Depends on:
Blocks: Clipboard
  Show dependency treegraph
Reported: 2018-02-26 23:56 UTC by Johannes Wilm
Modified: 2019-03-10 16:14 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

ODT file with metadata in refmark (8.89 KB, application/vnd.oasis.opendocument.text)
2018-03-09 17:56 UTC, Johannes Wilm
ODT file with metadata in refmark (8.93 KB, application/vnd.oasis.opendocument.text)
2018-03-09 18:14 UTC, Johannes Wilm

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Wilm 2018-02-26 23:56:50 UTC
when copying text from LibreOffice Writer, fields such as page number or dates are marked by means of fields that hold metadata. However, reference-mark-* tags are stripped out. These tags hold valuable information, used for example by citation managers like Zotero. It would be helpful if the attributes of these tags were preserved in the HTML output.
Comment 1 Buovjaga 2018-03-09 17:43:40 UTC
Please attach a document that contains such tags. I tried with page number, but it did not have the tags in content.xml.

To inspect the clipboard I will use this in Linux:
xclip -selection clipboard -o -t text/html

Change back to UNCONFIRMED after you have provided the document.
Comment 2 Johannes Wilm 2018-03-09 17:56:17 UTC Comment hidden (obsolete)
Comment 3 Johannes Wilm 2018-03-09 17:56:33 UTC

this is the output of xclip. Document contains one refmark created with the Zotero plugin and one page number. The page number is tagged with an sdfield-tag. The refmark "(Anderson 1991)" is not tagged.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
	<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
	<meta name="generator" content="LibreOffice (Linux)"/>
	<style type="text/css">
		@page { margin: 0.79in }
		p { margin-bottom: 0.1in; line-height: 120% }
<body lang="en-US" dir="ltr">
<p style="margin-bottom: 0in; line-height: 100%">start(Anderson
1991)end<sdfield type=PAGE subtype=RANDOM format=PAGE>1</sdfield></p>
Comment 4 Johannes Wilm 2018-03-09 18:14:51 UTC
Created attachment 140521 [details]
ODT file with metadata in refmark
Comment 5 Buovjaga 2018-03-09 18:25:59 UTC
Yep, looked inside the content.xml and it has <text:reference-mark-start etc.

Arch Linux 64-bit
Build ID: b8fe96f1da2c42c04a8094ca8c57d49763b7bded
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on March 8th 2018

Arch Linux 64-bit
Version (Build ID: e183d5b)
Comment 6 QA Administrators 2019-03-10 03:21:31 UTC Comment hidden (obsolete)
Comment 7 Johannes Wilm 2019-03-10 16:14:26 UTC
Issue still present in Version:
Build ID: 7bcb35dc3024a62dea0caee87020152d1ee96e71
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded