Bug Hunting Session
Bug 90905 - Save as HTML produces incorrect links
Summary: Save as HTML produces incorrect links
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.2.2 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Vasily Melenchuk (CIB)
URL:
Whiteboard: target:5.0.0 target:4.4.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-04-28 07:29 UTC by bugzilla
Modified: 2015-12-17 08:59 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample file (8.51 KB, application/vnd.oasis.opendocument.text)
2015-04-28 07:29 UTC, bugzilla
Details
Incorrect HTML output (3.87 KB, text/html)
2015-04-28 07:30 UTC, bugzilla
Details
Correct HTML output from 4.2 version (3.94 KB, text/html)
2015-04-28 07:31 UTC, bugzilla
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bugzilla 2015-04-28 07:29:52 UTC
Created attachment 115150 [details]
Sample file

Steps to reproduce:
1. Create file
2. Add text with H3 style
3. Drag and drop said text from navigator to produce link
4. Save document as html

In resulting HTML file href attribute will be empty. I attached example document. I can confirm this feature working in 4.2 and 4.3.
Thanks.
Comment 1 bugzilla 2015-04-28 07:30:28 UTC
Created attachment 115151 [details]
Incorrect HTML output
Comment 2 bugzilla 2015-04-28 07:31:15 UTC
Created attachment 115152 [details]
Correct HTML output from 4.2 version
Comment 3 raal 2015-04-28 11:43:42 UTC
I can confirm with LO 4.4.2, win7

Difference:
<a href="#0.0.1.A1|outline">A1</a>
<a href="">A1</a>
Comment 4 Buovjaga 2015-04-28 12:03:45 UTC
Yep, works in 4.3.6, broken in 5.0.

Win 7 Pro 64-bit Version: 5.0.0.0.alpha1+ (x64)
Build ID: f0edb677f09ad338e22ac3b5d91497b4479e0b3c
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-04-27_01:54:20
Locale: fi_FI

Ubuntu 15.04 64-bit 
Version: 4.3.6.2
Build ID: d50a87b2e514536ed401c18000dad4660b6a169e
Comment 5 Andras Timar 2015-04-30 08:09:17 UTC
Regression caused by:
commit 0706b5756e06b7773a78e3046a47efc2c81d92b1
Author: Vasily Melenchuk <vasily.melenchuk@cib.de>
Date:   Tue Jan 27 16:18:24 2015 +0000

    tdf#76291 write encoded URL as href in html output
    
    INetURLObject class is used to create correctly encoded URL
    
    Change-Id: Icc9e71e848fd8a0b487f74232b9ad3e7ddde50b4
    Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Comment 6 Vasily Melenchuk (CIB) 2015-04-30 08:23:34 UTC
While it is a consequence of my fix, I'll take a look there.
Comment 7 Vasily Melenchuk (CIB) 2015-05-12 08:10:26 UTC
Solution for this problem was pushed to gerrit https://gerrit.libreoffice.org/#/c/15625/
Comment 8 Commit Notification 2015-05-19 12:01:18 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "master":

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

tdf#90905 fix for url encoding in internal urls

It will be available in 5.0.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 9 Commit Notification 2015-05-19 12:10:18 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7ce44f5f8e786a1bfd56aad8e30ef52702115ba2&h=libreoffice-4-4

tdf#90905 fix for url encoding in internal urls

It will be available in 4.4.4.

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 10 christian.grimsel 2015-08-17 16:36:30 UTC
same problem when using text markers and hyperlinks to jump to these text markers; OK in ODT format file, broken in 4.4.? html format file.

LO 4.3.5.2 (Windows 7) html output is OK
<p style="margin-top: 0.1cm; margin-bottom: 0cm">The <a href="#QVel_Introduction_Contents">first
	section</a> explains concepts and backgrounds of QVel<sup>(NG)</sup>.</p>

LO 4.4.3.2 and LO 4.4.5.2 html output of same ODT file is broken
<p style="margin-top: 0.1cm; margin-bottom: 0cm">The <a href="">first
	section</a> explains concepts and backgrounds of QVel<sup>(NG)</sup>.</p>

(first time ever reporting a bug, not sure about status "reopened"; sorry, when wrong)
Comment 11 Vasily Melenchuk (CIB) 2015-08-28 10:45:00 UTC
(In reply to christian.grimsel from comment #10)
> same problem when using text markers and hyperlinks to jump to these text
> markers; OK in ODT format file, broken in 4.4.? html format file.

This problem already reported (and fixed) as #93449, so returning this bug to FIXED state.
Comment 12 Robinson Tryon (qubit) 2015-12-17 08:59:25 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]