From 33f264397471ae485ed14cc411fe5b517e43c997 Mon Sep 17 00:00:00 2001 From: Jojo Aquino Date: Tue, 20 Oct 2020 11:32:00 +0800 Subject: [PATCH] Update PiranhaHtmlExtensions.cs specify og tags as 'property' isntead of 'name' to satisfy fb share debugger warning --- .../Extensions/PiranhaHtmlExtensions.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/Piranha.AspNetCore/Extensions/PiranhaHtmlExtensions.cs b/core/Piranha.AspNetCore/Extensions/PiranhaHtmlExtensions.cs index 20fd62336..ce0f6dab8 100644 --- a/core/Piranha.AspNetCore/Extensions/PiranhaHtmlExtensions.cs +++ b/core/Piranha.AspNetCore/Extensions/PiranhaHtmlExtensions.cs @@ -68,26 +68,26 @@ public static HtmlString MetaTags(this IApplicationService app, IMeta content, b // Generate open graph tags if (content is PageBase page && page.IsStartPage) { - sb.AppendLine($""); + sb.AppendLine($""); } else { - sb.AppendLine($""); + sb.AppendLine($""); } - sb.AppendLine($""); + sb.AppendLine($""); if (content.OgImage != null && content.OgImage.HasValue) { - sb.AppendLine($""); + sb.AppendLine($""); } else if (content is RoutedContentBase contentBase && contentBase.PrimaryImage != null && contentBase.PrimaryImage.HasValue) { // If there's no OG image specified but we have a primary image, // default to the primary image. - sb.AppendLine($""); + sb.AppendLine($""); } if (!string.IsNullOrWhiteSpace(OgDescription(content))) { - sb.AppendLine($""); + sb.AppendLine($""); } } return new HtmlString(sb.ToString()); @@ -119,4 +119,4 @@ private static string ClassNameToWebName(string str) { return Regex.Replace(str, "([A-Z])", " $1", RegexOptions.Compiled).Trim().Replace(" ", "-").ToLower(); } -} \ No newline at end of file +}