diff --git a/tracker/tracker/CHANGELOG.md b/tracker/tracker/CHANGELOG.md index 5b18ad276..dd9840daf 100644 --- a/tracker/tracker/CHANGELOG.md +++ b/tracker/tracker/CHANGELOG.md @@ -1,10 +1,11 @@ # 7.0.0 - **[breaking]** added gzip compression to large messages +- fix email regexp to significantly improve performance # 6.0.2 -- fix network tracking for samedomain iframes created by js code +- fix network tracking for same domain iframes created by js code # 6.0.1 diff --git a/tracker/tracker/src/main/app/sanitizer.ts b/tracker/tracker/src/main/app/sanitizer.ts index 202e459fc..3b30bdefa 100644 --- a/tracker/tracker/src/main/app/sanitizer.ts +++ b/tracker/tracker/src/main/app/sanitizer.ts @@ -68,7 +68,7 @@ export default class Sanitizer { } if (this.options.obscureTextEmails) { data = data.replace( - /([^\s]+)@([^\s]+)\.([^\s]+)/g, + /^\w+([.-]\w+)*@\w+([.-]\w+)*\.\w{2,3}$/g, (...f: Array) => stars(f[1]) + '@' + stars(f[2]) + '.' + stars(f[3]), ) }