Skip to content

Commit

Permalink
Removed tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
izdrail committed Dec 15, 2024
1 parent c3846c2 commit b262fe7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ def _replace_links_and_emails(self, content: str, template_name: str) -> str:
# Replace <meta name="description"> with a template description
content = re.sub(
r'<meta\s+name="description"\s+content=".*?"\s*/>',
f'<meta name="description" content="{template_name} free email template." /><script defer src="https://analytics.izdrail.com/script.js" data-website-id="cf5caa0b-8345-4f76-885f-b6e5b4af5ba3"></script>',
f'<meta name="description" content="{template_name} free email template." />',
content
)

# If no <meta description> is found, add one with the template name
if not re.search(r'<meta\s+name="description"', content):
content = f'<meta name="description" content="{template_name} description." /><script defer src="https://analytics.izdrail.com/script.js" data-website-id="cf5caa0b-8345-4f76-885f-b6e5b4af5ba3"></script>' + content
content = f'<meta name="description" content="{template_name} description." />' + content

return content

Expand Down

0 comments on commit b262fe7

Please sign in to comment.