Bug 60071 - Copy table from Calc to HTML Editor (HTML tags - SDVAL)
Summary: Copy table from Calc to HTML Editor (HTML tags - SDVAL)
Status: CLOSED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86-64 (AMD64) Windows (All)
: high critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-30 11:21 UTC by Pawel
Modified: 2020-01-11 11:04 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 Pawel 2013-01-30 11:21:31 UTC
Hello,

In HTML code Libreoffice put special HTML tags like SDVAL.
While editting pasted table in mail client like Thunderbird, SDVAL value still exists.

It is because of HTML tag SDVAL, which Thundebird doesn't touch.
Hence it causes that deleted values from tables can still be viewed by LibreOffice calc simple by copy table from Thunderbird to Calc.

Do you really need to put this special tags and force other HTML clients to cut unknown html tags?

To reproduce:
make 2 columns, 2 rows table with values:
1 2
3 4
each in other cell.

Copy it to thunderbird or gmail 'Create mail' box, cut value e.g. '2'.

CTRL+A to copy whole text and paste to Calc. You have your full table again.

This happens only in Windows. In Ubuntu LibreOffice doesn't put this tags.
Comment 1 bfoman (inactive) 2013-06-24 09:34:48 UTC
Confirmed with:
LO 4.1.0.0.beta2
Build ID: 33224f4f11a05cfad2249e812fcc2975fbb61f6
Windows 7 Professional SP1 64 bit

Example HTML code, where value is deleted in TB, but still copied back to LO because it is defined in sdval:

<td sdval="1" sdnum="1045;" align="RIGHT" height="17">1</td>
<td sdval="2" sdnum="1045;" align="RIGHT"><br></td>

I don't think that this bug is high critical.
Comment 2 Pawel 2013-06-24 09:46:27 UTC
I've mark it as high critical because in company environment, when some people are editing table as in description, some critical / confidential data can be send to unauthorized person.
Comment 3 Thomas Arnhold 2013-10-10 17:59:22 UTC
Patch is here: https://gerrit.libreoffice.org/#/c/6194/
Comment 4 Eike Rathke 2013-10-11 15:53:07 UTC
I'm not convinced of removing these custom attributes. They serve to transport numeric and format information, not only when saving/loading as HTML but also when copying via clipboard and paste special in HTML format. For example it is possible to transport the assigned number formats of a copied Calc cell range pasted as HTML to Writer.

Effectively the patch pointed to in comment 3 removes this functionality.

If these custom attributes are to be removed because of confidentiality concerns (which IMHO is a bit far fetched because any HTML generator may add custom attributes some other application is not aware of, just take a look at MS-Office generated files or files generated by websites meant to be loaded in Excel) then it should be done in such a way that the internal clipboard transport is not affected, and/or upon request of the user.
Comment 5 Thomas Arnhold 2013-10-14 09:29:35 UTC
Thanks Eike, I didn't see this case. I only thought about exporting the ods to html. I didn't know, that I can paste special with html code. So this patch isn't the solution.

To remove those special fields we should probably add an option the the export dialog.
Comment 6 Pawel 2013-10-14 10:07:12 UTC
@Eike, do you know why SDVAL is still present when value has already been deleted from cell?
Because if it is not used for any purpose, the best patch to improve this would be removing SDVAL, when cell value is deleted.
Comment 7 Thomas Arnhold 2013-10-14 15:32:52 UTC
@Pawel: That is because SDVAL and SDNUM represent the formatting of the cell. If you only delete the cell value the formatting is still present. If you want to delete the formatting and the content right click on the cell, then "Delete Contents" -> "Delete All". After that the cell formatting isn't exported to HTML anymore.
Comment 8 Pawel 2013-10-14 17:21:45 UTC
I just don't get it, why SDVAL wasn't needed by other OS'es than Windows.

But I've checked issue now and I cannot reproduce it.
It seems that in the LO 4.1.1.2 bug has been successfully fixed
Comment 9 Thomas Arnhold 2013-10-16 19:39:02 UTC
So I'm closing this...
Comment 10 Ethan Gwynne 2019-09-13 06:01:56 UTC Comment hidden (spam)
Comment 11 SMS Gateway 2019-10-23 12:55:22 UTC Comment hidden (spam)
Comment 12 parkwhat 2020-01-11 11:04:23 UTC Comment hidden (spam)