Bug 119966 - Support file URI scheme in format of 'file:///' from HTML clipboard content. This is a format generated from MSO 2007-2013
Summary: Support file URI scheme in format of 'file:///' from HTML clipboard content. ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://blogs.msdn.microsoft.com/free...
Whiteboard:
Keywords:
Depends on:
Blocks: Paste-From-MSO
  Show dependency treegraph
 
Reported: 2018-09-18 19:55 UTC by Luke
Modified: 2023-05-09 11:33 UTC (History)
2 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 Luke 2018-09-18 19:55:36 UTC
When pasting special URL's with 'file://' fail to open.

Steps to reproduce:
1. Open a document containing images with Word 2007-2013 (NOT 2016), such as attachment 92563 [details]
2. Copy into clipboard
3. Paste Special into Writer using "HTML format without comments"

Expected results:
Images is successfully pasted into Writer

Actual results:
A placeholder showing the image’s URL in the file system is shown.  Ex: file://C:\Users\AAA\Appdata\Local\Temp\clip\01\image001.jpg

When tested with other Windows application. 
WordPerfect x9: PASS
TextMaker 2018: PASS

Note you can fix this issue by clicking on the image placeholder 

1. Properties->Image->Link->file name
2. delete the 'file://'
3. From file://C:\Users\AAA\Appdata\Local\Temp\clip\01\image001.jpg


We either need to add file:// support to our HTML importer or we need to have our pasting module strip it out in the case of "HTML format without comments"
Comment 1 Luke 2018-09-18 21:08:53 UTC
Even before you modify the file URI, the image is correctly previewed. Also, this can be fixed by changing 'file:///' to 'file://' to allow the image to load.
Comment 2 Luke 2018-09-19 19:27:25 UTC
One more datapoint. With Paste Special -> "HTML format"
WPS Writer: PASS
Comment 3 raal 2018-09-20 05:34:35 UTC
Confirm with Version: 6.2.0.0.alpha0+
Build ID: a27ae800fed5a974c9b255f7ce2b38ec2dbaa426
CPU threads: 4; OS: Windows 6.1; UI render: default;   and MSOffice 2010
Comment 4 QA Administrators 2019-09-21 03:07:03 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2021-09-21 04:52:54 UTC Comment hidden (obsolete)
Comment 6 Luke 2021-11-18 18:16:18 UTC
Still cannot Paste Special into Writer using "HTML format without comments" in 
Version: 7.3.0.0.alpha1+ (x86) / LibreOffice Community
Build ID: 4be0ae19065b1b50870bc0b2a28189ad39c96a8a

Now gives an error that you cannot fix by editing the URL.
Comment 7 Mike Kaganski 2023-05-09 11:33:25 UTC
(In reply to Luke from comment #0)
> (NOT 2016)

This is important.

> file://C:\Users\AAA\Appdata\Local\Temp\clip\01\image001.jpg

This is an invalid URL. The standard directly says that backslashes are prohibited in URLs.

And so: why spend time implementing support for something that MS *has fixed* in their later products? By the way, we do support such invalid URLs in other places. But introduce more special casing? And fixing this would require *at least* a snapshot of such an invalid clipboard content (e.g., using NirSoft's Inside Clipboard utility), or the developer needs to have Word 2010 or 2013...

My opinion is: isn't worth it, WONTFIX (or even NOTOURBUG).
But if the clipboard data is provided, and someone volunteers, why not...