hedgeagent/1.12.0 #1

Open
sa6anw wants to merge 201 commits from hedgeagent/1.12.0 into hedgeagent/1.10.5
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 1a7c27470e - Show all commits

View File

@@ -6,6 +6,7 @@
- Added external link whitelist setting (`externalLinkWhitelist` in config.json or `CMD_EXTERNAL_LINK_WHITELIST`) to skip warning page for certain domains
- Added external link warning setting (`externalLinkWarning` in config.json or `CMD_EXTERNAL_LINK_WARNING`) to disable the external link warning page entirely
- Fixed external link warning for subpath instances
- Enabled `.webp` for file uploads (for all backends but `imgur`, since it does not support it)
### Bugfixes

View File

@@ -624,7 +624,8 @@ export function rewriteExternalLinks (view) {
return
}
const noteURL = window.location.pathname.split('/').pop()
anchor.attr('href', `${window.location.origin}/_link?url=${encodeURIComponent(parsed.href)}&note=${noteURL}`)
const urlPath = window.urlpath ? `/${window.urlpath}` : ''
anchor.attr('href', `${window.location.origin}${urlPath}/_link?url=${encodeURIComponent(parsed.href)}&note=${noteURL}`)
})
}
window.rewriteExternalLinks = rewriteExternalLinks