for a project my content editors want to insert some sort of embed code from different plattforms. for that i created a "embed" macro with parameter textmultiline "embedCode" to use with RTE.
The correct rendering of the parameter input doesn't work as expected in my razor code:
that outputs the Emebed Code but the Code gets surrended by quotions marks in the HTML:
<div>"<a href="..">...</a>"</div>
My Main Razor File in the template checks what to render an then calls @Renderpage(..) to render parts of the page. In one of that scripts the RTE gets rendered by @Html.Raw(umbraco.library.RenderMacroContent(Model.bodyText.ToString(), Model.Id)), tried @Model.bodyText too, but that doesn't change anything in the output for the Macro.
Any Ideas?
thx in advance, Andreas
and the strange thing is, that only happens in that installation. Tried that in a clean installation and worked as expected.
Problem with Macro Parameter Multiline in Razor
Hi,
for a project my content editors want to insert some sort of embed code from different plattforms. for that i created a "embed" macro with parameter textmultiline "embedCode" to use with RTE.
The correct rendering of the parameter input doesn't work as expected in my razor code:
<div>@Html.Raw(Parameter.embedCode)</div>
<div>@Html.Raw(Parameter.embedCode.ToString())</div>
that outputs the Emebed Code but the Code gets surrended by quotions marks in the HTML:
<div>"<a href="..">...</a>"</div>
My Main Razor File in the template checks what to render an then calls @Renderpage(..) to render parts of the page. In one of that scripts the RTE gets rendered by @Html.Raw(umbraco.library.RenderMacroContent(Model.bodyText.ToString(), Model.Id)), tried @Model.bodyText too, but that doesn't change anything in the output for the Macro.
Any Ideas?
thx in advance,
Andreas
and the strange thing is, that only happens in that installation. Tried that in a clean installation and worked as expected.
-----------
Umbraco 6.1.5 (upgraded from 6.0.5), Web Forms
there was a really good answer in stackoverflow:
http://stackoverflow.com/questions/19818223/umbraco-razor-html-escaping-issue
It worked for me at least.
is working on a reply...