Browse Source

Merge pull request #8505 from nocodb/nc-fix/8493-email-template-issue

fix: Email invitation bug
pull/8507/head
Pranav C 6 months ago committed by GitHub
parent
commit
661524baab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      packages/nocodb/src/utils/emailUtils.ts
  2. 1
      scripts/upgradeNcGui.js

6
packages/nocodb/src/utils/emailUtils.ts

@ -8,8 +8,8 @@ const encode = (str: string) => {
// a method to sanitise content and avoid any link/url injection in email content and html encode special chars // a method to sanitise content and avoid any link/url injection in email content and html encode special chars
// for example: example.com to be converted as example<span>.<span>com // for example: example.com to be converted as example<span>.<span>com
export const sanitiseEmailContent = (content: string) => { export const sanitiseEmailContent = (content?: string) => {
return content return content
.replace(/[<>&;?#,'"$]+/g, encode) ?.replace(/[<>&;?#,'"$]+/g, encode)
.replace(/\.|\/\/:/g, '<span>$&</span>'); ?.replace(/\.|\/\/:/g, '<span>$&</span>');
}; };

1
scripts/upgradeNcGui.js

@ -36,7 +36,6 @@ if (process.env.targetEnv === 'DEV') {
// replace nc-lib-gui by nc-lib-gui-daily if it is nightly build / pr release // replace nc-lib-gui by nc-lib-gui-daily if it is nightly build / pr release
const filePaths = [ const filePaths = [
path.join(__dirname, '..', 'packages', 'nocodb', 'Dockerfile'), path.join(__dirname, '..', 'packages', 'nocodb', 'Dockerfile'),
path.join(__dirname, '..', 'packages', 'nocodb', 'litestream', 'Dockerfile'),
path.join(__dirname, '..', 'packages', 'nocodb', 'package.json'), path.join(__dirname, '..', 'packages', 'nocodb', 'package.json'),
path.join(__dirname, '..', 'packages', 'nocodb', 'src', 'Noco.ts'), path.join(__dirname, '..', 'packages', 'nocodb', 'src', 'Noco.ts'),
path.join(__dirname, '..', 'packages', 'nocodb', 'src', 'nocobuild.ts'), path.join(__dirname, '..', 'packages', 'nocodb', 'src', 'nocobuild.ts'),

Loading…
Cancel
Save