Version 3.0.0-beta004

Beta
Date 2019-12-19 (1,830 days ago)
Downloads 7,540 downloads
NuGet View on NuGet
GitHub View on GitHub
Target Frameworks .NET 4.7.2
Umbraco Versions Umbraco 8

#installation">Installation

#changelog">Changelog

  • Updated the GridControlEmbedValue class due to breaking changes in Umbraco 8.2 (see #33)
    In Umbraco 8.2, the way embed values are stored changed, resulting in a breaking change in Umbraco and thereby also in this package. The fix adresses those changes, but also ensures backwards compatibility with older values from Umbraco 8.1 and before.

    Thanks to @ArnoldV for finding the issue and submitting a PR 👍

    Details

    In Umbraco 8.1, the value of an embed grid control would be saved as a string value - eg.:

    {
      "value": "<iframe width=\"360\" height=\"203\" src=\"https://www.youtube.com/embed/VTnDYxwhSaI?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
      "editor": {
        "alias": "embed"
      }
    }

    In Umbraco 8.2 and newer, the value is instead saved as a JSON object with more information about the embedded resource:

    {
      "value": {
        "constrain": true,
        "height": 240,
        "width": 360,
        "url": "https://www.youtube.com/watch?v=VTnDYxwhSaI",
        "info": "",
        "preview": "<iframe width=\"360\" height=\"203\" src=\"https://www.youtube.com/embed/VTnDYxwhSaI?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"
      },
      "editor": {
        "alias": "embed"
      }
    }
  • Fixed an issue with GridControlHtmlValue and GetSearchableText (see 41d282c)
    Previously, any HTML elements in the value would be replaced by an empty string. In some cases, this could cause two words to be joined as one - eg. hello<br />world would become helloworld. With this release, HTML elements are instead replaced by a space, ensuring hello<br />world is instead converted into hello world.