Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
zadam committed Jan 7, 2024
2 parents 37baa4c + 439743d commit d63d42d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/services/notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,10 @@ function saveAttachments(note, content) {
content = `${content.substr(0, attachmentMatch.index)}<a class="reference-link" href="#root/${note.noteId}?viewMode=attachments&attachmentId=${attachment.attachmentId}">${title}</a>${content.substr(attachmentMatch.index + attachmentMatch[0].length)}`;
}

// removing absolute references to server to keep it working between instances,
// we also omit / at the beginning to keep the paths relative
content = content.replace(/src="[^"]*\/api\/attachments\//g, 'src="api/attachments/');

return content;
}

Expand Down

0 comments on commit d63d42d

Please sign in to comment.