Hi,
I have a Macro-Parameter where the user can insert Code-Snippets in the grid.
Simple example:
<script>alert("Hello World")</script>
I tried to render this Snipet in Razor, but it is rendered with html-Escape-code:
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
@Html.Raw(Model.MacroParameters["Code"])
}
Result:
<script>
alert("hello world");
</script>
Is there a way to render it, so that the code does its job?
This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/75330-render-javascript-code-from-string-in-razor