Merge pull request #26757 from blaggacao/fix/webform-meta-tag

This commit is contained in:
Suraj Shetty 2024-06-21 16:26:54 +05:30 committed by GitHub
commit 90fa93f67c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -64,7 +64,10 @@ class TestWebForm(FrappeTestCase):
set_request(method="GET", path="manage-events/new")
content = self.normalize_html(get_response_content("manage-events/new"))
self.assertIn(self.normalize_html('<meta name="name" content="Test Meta Form Title">'), content)
self.assertIn(self.normalize_html('<meta name="title" content="Test Meta Form Title">'), content)
self.assertIn(
self.normalize_html('<meta property="og:title" content="Test Meta Form Title">'), content
)
self.assertIn(
self.normalize_html('<meta property="og:description" content="Test Meta Form Description">'),
content,

View file

@ -256,7 +256,7 @@ def get_context(context):
description = self.introduction_text[:140]
context.metatags = {
"name": self.meta_title or self.title,
"title": self.meta_title or self.title,
"description": description,
"image": self.meta_image,
}