Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter van Geffen 54 posts 290 karma points
    Jan 06, 2020 @ 09:53
    Peter van Geffen
    0

    (Special) characters in macro textarea

    If i put some basic (special) characters like a single quote ('), double qoute (") or an ampersand (&) it doesn't get rendered correct on the front end.

    Like this:

    'Single quote' --- "Double quote" --- & - Ampersand
    

    This is the HTML how it got placed

    @if (!string.IsNullOrEmpty(Model.MacroParameters["tekst"].ToString())){
        <p>
        @Model.MacroParameters["tekst"].ToString()
        </p>
    }
    

    We're using Umbraco Version 8.3.0

  • Peter van Geffen 54 posts 290 karma points
    Jan 07, 2020 @ 07:45
    Peter van Geffen
    102

    Html.Raw was the solution

Please Sign in or register to post replies

Write your reply to:

Draft