fixes for relative paths

This commit is contained in:
zadam
2019-02-22 23:03:20 +01:00
parent cf5ec44303
commit b25deea21d
7 changed files with 8 additions and 7 deletions

View File

@@ -207,7 +207,8 @@ function findImageLinks(content, foundLinks) {
}
// removing absolute references to server to keep it working between instances
return content.replace(/src="[^"]*\/api\/images\//g, 'src="/api/images/');
// we also omit / at the beginning to keep the paths relative
return content.replace(/src="[^"]*\/api\/images\//g, 'src="api/images/');
}
function findHyperLinks(content, foundLinks) {