From 1fc2c89ea68bc84f00b44be315c033ed4257f5a2 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 19 Dec 2019 16:01:55 +0000 Subject: [PATCH] Updates the HTML Razor Partial View for grid cell items that use Embed It has been recently updated in 8.2.0 that the Value stored is a JSON object containing width, height & the raw HTML returned by the oEmbed Fixes #7178 --- .../Views/Partials/Grid/Editors/Embed.cshtml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/Embed.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/Embed.cshtml index 393157bcf8..866d3d2bdd 100644 --- a/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/Embed.cshtml +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/Embed.cshtml @@ -1,7 +1,14 @@ @model dynamic @using Umbraco.Web.Templates - +@{ + var embedValue = string.Empty; + try { + embedValue = Model.value.preview; + } catch(Exception ex) { + embedValue = Model.value; + } +}
- @Html.Raw(Model.value) + @Html.Raw(embedValue)