mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-25 22:27:32 +00:00
fix(notifications): RFC 2047-encode ntfy header umlauts (#1621)
This commit is contained in:
committed by
GitHub
parent
0b4737448d
commit
229ec6d18e
@@ -513,7 +513,7 @@ export function resolveAdminNtfyUrl(adminCfg: NtfyConfig): string | null {
|
||||
|
||||
function encodeHeaderValue(value: string): string {
|
||||
for (let i = 0; i < value.length; i++) {
|
||||
if (value.charCodeAt(i) > 0xff) {
|
||||
if (value.charCodeAt(i) > 0x7f) {
|
||||
return `=?UTF-8?B?${Buffer.from(value, 'utf8').toString('base64')}?=`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user