Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix email link escaping

Chocobozzzf9b46e816ef8
diff --git a/packages/tests/src/api/users/registrations.ts b/packages/tests/src/api/users/registrations.ts
index dbe1bc4f5e..dcf09cade6 100644
--- a/packages/tests/src/api/users/registrations.ts
+++ b/packages/tests/src/api/users/registrations.ts
@@ -202,7 +202,7 @@ describe('Test registrations', function () {
await server.registrations.reject({ id: id4, moderationResponse: 'I do not want id 4 on this instance' })
})
- it('Should have sent an email to the user explanining the registration has been rejected', async function () {
+ it('Should have sent an email to the user explaining the registration has been rejected', async function () {
this.timeout(50000)
await waitJobs([ server ])
@@ -220,7 +220,7 @@ describe('Test registrations', function () {
await server.registrations.accept({ id: id3, moderationResponse: 'Welcome id 3' })
})
- it('Should have sent an email to the user explanining the registration has been accepted', async function () {
+ it('Should have sent an email to the user explaining the registration has been accepted', async function () {
this.timeout(50000)
await waitJobs([ server ])
diff --git a/server/core/lib/emailer.ts b/server/core/lib/emailer.ts
index 6a4fc46c2a..035fcdb124 100644
--- a/server/core/lib/emailer.ts
+++ b/server/core/lib/emailer.ts
@@ -1,6 +1,7 @@
import { arrayify } from '@peertube/peertube-core-utils'
import { EmailPayload, SendEmailDefaultOptions, UserExportState, UserRegistrationState } from '@peertube/peertube-models'
import { isTestOrDevInstance, root } from '@peertube/peertube-node-utils'
+import { UserModel } from '@server/models/user/user.js'
import { readFileSync } from 'fs'
import merge from 'lodash-es/merge.js'
import { Transporter, createTransport } from 'nodemailer'
@@ -10,7 +11,6 @@ import { CONFIG, isEmailEnabled } from '../initializers/config.js'
import { WEBSERVER } from '../initializers/constants.js'
import { MRegistration, MUser, MUserExport, MUserImport } from '../types/models/index.js'
import { JobQueue } from './job-queue/index.js'
-import { UserModel } from '@server/models/user/user.js'
class Emailer {
@@ -253,6 +253,7 @@ class Emailer {
const email = new EmailTemplates({
send: true,
+ juice: false,
htmlToText: {
selectors: [
{ selector: 'img', format: 'skip' },