Date | 2019-12-19 (1,793 days ago) |
---|---|
Downloads | 7,531 downloads |
NuGet | View on NuGet |
GitHub | View on GitHub |
Target Frameworks | .NET 4.7.2 |
Umbraco Versions | Umbraco 8 |
#installation
">Installation#changelog
">ChangelogUpdated 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 👍
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"
}
}
GridControlHtmlValue
and GetSearchableText
(see 41d282c
)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
.