From 2cc9c49b0e6f2735f86c81f9e9056853632313bf Mon Sep 17 00:00:00 2001 From: "T. Kim Nguyen" Date: Sun, 27 Nov 2016 16:33:00 -0600 Subject: [PATCH] prevent extra '@' in twitter:site meta tag --- CHANGES.rst | 3 +++ plone/app/layout/viewlets/social.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index ddb0aa34..4d9079f7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -62,6 +62,9 @@ Bug fixes: Fixes missing template class with plone.app.blocks based layouts in Mosaic. [thet] +- prevent extra '@' in twitter:site meta tag + [tkimnguyen] + 2.6.2 (2016-11-18) ------------------ diff --git a/plone/app/layout/viewlets/social.py b/plone/app/layout/viewlets/social.py index 53d78386..312caf66 100644 --- a/plone/app/layout/viewlets/social.py +++ b/plone/app/layout/viewlets/social.py @@ -59,7 +59,7 @@ def _get_tags(self): ] if settings.twitter_username: tags.append(dict(name="twitter:site", - content="@" + settings.twitter_username)) + content="@" + settings.twitter_username.lstrip('@'))) if settings.facebook_app_id: tags.append(dict(property="fb:app_id", content=settings.facebook_app_id))