mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
added base element to handle external links in exports, #1289
This commit is contained in:
parent
32d609e796
commit
287ef9b522
@ -226,11 +226,13 @@ function exportToZip(taskContext, branch, format, res) {
|
||||
if (!content.substr(0, 100).toLowerCase().includes("<html")) {
|
||||
const cssUrl = "../".repeat(noteMeta.notePath.length - 1) + 'style.css';
|
||||
|
||||
// <base> element will make sure external links are openable - https://github.com/zadam/trilium/issues/1289#issuecomment-704066809
|
||||
content = `<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="${cssUrl}">
|
||||
<base target="_parent">
|
||||
</head>
|
||||
<body>
|
||||
<h1>${utils.escapeHtml(title)}</h1>
|
||||
|
Loading…
x
Reference in New Issue
Block a user