From a64d6b99e2cd2e65528619f9bfb769f32073619d Mon Sep 17 00:00:00 2001 From: Frank Branicky Date: Thu, 8 Apr 2021 14:47:15 -0400 Subject: [PATCH] fix-362 using content attribute for twitter:card meta tag --- src/Articulate/HtmlHelperExtensions.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Articulate/HtmlHelperExtensions.cs b/src/Articulate/HtmlHelperExtensions.cs index fc58056f..1631e63d 100644 --- a/src/Articulate/HtmlHelperExtensions.cs +++ b/src/Articulate/HtmlHelperExtensions.cs @@ -21,12 +21,12 @@ public static class HtmlHelperExtensions /// /// Renders the Post date with Author details if author details are supplied /// - /// + /// /// /// public static IHtmlString AuthorCitation(this HtmlHelper html, PostModel model) { - var sb = new StringBuilder(); + var sb = new StringBuilder(); if (model.Author != null) { sb.Append(""); @@ -53,7 +53,7 @@ public static IHtmlString AuthorCitation(this HtmlHelper html, PostModel model) /// /// /// - /// + /// public static IHtmlString SocialMetaTags(this HtmlHelper html, IMasterModel model) { var builder = new StringBuilder(); @@ -110,7 +110,7 @@ private static void SocialMetaTags(IPublishedContent model, StringBuilder builde { var twitterTag = new TagBuilder("meta"); twitterTag.Attributes["name"] = "twitter:card"; - twitterTag.Attributes["value"] = "summary"; + twitterTag.Attributes["content"] = "summary"; builder.AppendLine(twitterTag.ToString(TagRenderMode.StartTag)); //non-closing since that's just the way it is var openGraphTitle = new TagBuilder("meta"); @@ -126,7 +126,7 @@ private static void SocialMetaTags(IPublishedContent model, StringBuilder builde var openGraphUrl = new TagBuilder("meta"); openGraphUrl.Attributes["property"] = "og:url"; openGraphUrl.Attributes["content"] = model.Url(mode: UrlMode.Absolute); - builder.AppendLine(openGraphUrl.ToString(TagRenderMode.SelfClosing)); + builder.AppendLine(openGraphUrl.ToString(TagRenderMode.SelfClosing)); } public static IHtmlString RenderOpenSearch(this HtmlHelper html, IMasterModel model) @@ -301,7 +301,7 @@ public static HelperResult TagCloud(this HtmlHelper html, PostTagCollection mode ul.InnerHtml += li.ToString(); } - writer.Write(ul.ToString()); + writer.Write(ul.ToString()); }); }