Patch #16446
closedGenerate full URLs to images and linked pages in the Wiki HTML export
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.
Files
Related issues
Updated by Ebrahim Mohammadi over 10 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).
Updated by Holger Just over 10 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.
Updated by Toshi MARUYAMA over 10 years ago
- Related to Feature #3228: Attatched wiki images are not included in export to HTML added
Updated by Go MAEDA almost 7 years ago
- File full_links_in_wiki_export-r17180.diff full_links_in_wiki_export-r17180.diff added
- Target version set to 4.1.0
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.
Updated by Go MAEDA over 6 years ago
- Related to Defect #20910: Hierarchy in TOC is not preserved when Wiki index is exported to HTML added
Updated by Go MAEDA over 6 years 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.