Bug 99312 - Pasting web page with images served via HTTPS to Writer causes momentary hang, links the images and does not show them
Summary: Pasting web page with images served via HTTPS to Writer causes momentary hang...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.2.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Giuseppe Castagno (aka beppec56)
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-15 05:33 UTC by Andrej
Modified: 2016-08-10 15:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
linux fireFox web page in writer (26.62 KB, application/vnd.oasis.opendocument.text)
2016-04-15 05:33 UTC, Andrej
Details
linux opera web page in writer (27.08 KB, application/vnd.oasis.opendocument.text)
2016-04-15 05:34 UTC, Andrej
Details
windows7 fireFox web page in writer (227.47 KB, application/vnd.oasis.opendocument.text)
2016-04-15 05:34 UTC, Andrej
Details
windows7 opera web page in writer (230.05 KB, application/vnd.oasis.opendocument.text)
2016-04-15 05:34 UTC, Andrej
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej 2016-04-15 05:33:28 UTC
Created attachment 124349 [details]
linux fireFox web page in writer

I go the web page in FireFox and Opera:
https://people.gnome.org/~michael/blog/2014-11-10-opengl.html

repeat the next steps for both, FireFox and Opera:

select entire page (Ctrl + A)

copy page   (Ctrl + C)

open new writer document

paste the page (Ctrl + V)


I tested in LinuxMint and Windows7.


Result in writer after pasting the page from Firefox and Opera Linux:
===============================
There are no pictures in the writer document as there are on the web page.

There is vary bad performance. Writer freezes after pasting the web page and 
when I move back and forth in the writer document after pasting the page.
Every time I afterwords open the document, it also freezes. I suspect because 
it searches for the picture? But the picture is never shown.

In the writer document that was made from coping and pasting in Opera there 
are some text formatting missing like, "Faster, higher quality rendering" title
is not in bold. 

When I on Windows7 open the document that was made in LinuxMint, the pictures 
are surprisingly present, but smaller that should be. 


Result in writer after pasting the page from FireFox and Opera in Windows7:
===============================
The pictures are present in the writer document. Great!

Web page, copied from Opera is missing some text formatting, 
like "Faster, higher quality rendering" title is not in bold.


I do not think I have any special settings in writer that would have impact on
these problems, so I wonder, if someone else have similar problems.
Or is there a better way to import a web page into writer?
Comment 1 Andrej 2016-04-15 05:34:13 UTC
Created attachment 124350 [details]
linux opera web page in writer
Comment 2 Andrej 2016-04-15 05:34:41 UTC
Created attachment 124351 [details]
windows7 fireFox web page in writer
Comment 3 Andrej 2016-04-15 05:34:58 UTC
Created attachment 124352 [details]
windows7 opera web page in writer
Comment 4 Buovjaga 2016-04-26 16:57:49 UTC
Reproduced. It is related to HTTPS. If you copy & paste images served via HTTP, they get embedded to the document. HTTPS makes them linked and on Linux they are not shown.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.2.0.0.alpha1+
Build ID: 334599030e7b45153107a3075f9049a7463aac80
CPU Threads: 8; OS Version: Linux 4.5; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Built on April 22nd 2016
Comment 5 Giuseppe Castagno (aka beppec56) 2016-08-06 15:49:33 UTC
Looking at the debug logs of master, for https protocol the ssl certificates are not checked correctly while downloading the images in background.
To solve this I have a working patch, still under local analysis.

In the web page there is a link that while pasting into Writer becomes an image, that doesn't exist: <http://pyblosxom.sourceforge.net> in pasting becomes: <http://pyblosxom.sourceforge.net/images/pb_pyblosxom.gif> that is a html page instead:

HEAD - relative URL </images/pb_pyblosxom.gif
....
HEAD - received header: content-type:text/html

this should be looked into by another developer after the certificate problem is solved.
Comment 6 Commit Notification 2016-08-08 10:57:58 UTC
Giuseppe Castagno committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f60eaab748add19683e66c7e4bc073c9ce7887f7

Related: tdf#99312, add specialized interaction handler

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Giuseppe Castagno (aka beppec56) 2016-08-09 12:43:57 UTC
Tried with daily master on Linux and Windows 10, the image download problem from https sites seems fixed.

Though a confirmation is welcome.
Comment 8 Buovjaga 2016-08-10 15:05:29 UTC
Yep, images are now shown.

If there are other issues, different reports should be opened for them.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: 5d8639aaf2f60157c99c3ee3a8bfa78e4efd010a
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on August 9th 2016