Patch #16446

Generate full URLs to images and linked pages in the Wiki HTML export

Added by Holger Just about 4 years ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Wiki
Target version:4.0.0

Description

The HTML export of wiki pages does not generate full links which makes them about useless in the actual standalone HTML document.

The attached patch changes the export so that full URLs are generated for generated links including src attributes in images. This leads to the correct image attachmentss being referenced in the HTML page, which however might still require authentication.

The proposed solution is more correct than the current one but much simpler than the one proposed in #3228.

full_links_in_wiki_export.diff Magnifier (1 KB) Holger Just, 2014-03-27 16:30

full_links_in_wiki_export-r17180.diff Magnifier - patch for r17180 (1.01 KB) Go MAEDA, 2018-01-18 10:53


Related issues

Related to Redmine - Feature #3228: Attatched wiki images are not included in export to HTML New 2009-04-23
Related to Redmine - Defect #20910: Wiki HTML export bugs New

Associated revisions

Revision 17229
Added by Go MAEDA about 1 month ago

Generate full URLs to images and linked pages in the Wiki HTML export (#16446).

Patch by Holger Just.

History

#1 Updated by Ebrahim Mohammadi about 4 years ago

A problem with this approach is non-portability of exported files to other networks (in case of a LAN-based Redmine instance) and disconnected devices (in case of an Internet-based Redmine instance).

#2 Updated by Holger Just about 4 years ago

Sure, there are still cases where this doesn't work. However, this approach is better than what's currently there, namely that it doesn't work in any case.

To have a fully local export, the user would have to save the file again from their browsers which would then include the fetched remote files in a local directory accompanying the HTML file. While this could also partially done in Redmine by exporting a full archive, it's much more work than this simple patch as you still would have to consider resources that are merely referenced but are not local to the Redmine instance, e.g. external images.

#3 Updated by Toshi MARUYAMA almost 4 years ago

  • Related to Feature #3228: Attatched wiki images are not included in export to HTML added

#4 Updated by Go MAEDA 3 months ago

Holger Just wrote:

Sure, there are still cases where this doesn't work. However, this approach is better than what's currently there, namely that it doesn't work in any case.

Absolutely agree with Holger. The patch provided by Holger can be applied with a very slight change.

I suggest delivering this feature in Redmine 4.0.0 or 4.1.0. I am setting target version to 4.1.0.

#5 Updated by Go MAEDA about 1 month ago

#6 Updated by Go MAEDA about 1 month ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from 4.1.0 to 4.0.0

Committed. Thank you for providing the patch.

Also available in: Atom PDF