Copied to clipboard

Flag this post as spam?

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


  • k 255 posts 652 karma points
    Oct 23, 2019 @ 12:00
    k
    0

    @Html.StripHtml + umbraco 8

    Hello,

    What is the right syntax for @Html.StripHtml in umbraco 8 please.

    Thanks,

    Kusum

  • Kevin Jump 1867 posts 11859 karma points MVP 4x c-trib
    Oct 23, 2019 @ 12:04
    Kevin Jump
    0

    Hi

    strip all tags

    @Html.StripHtml("<p>my <strong>html</strong> string</p>", null);
    

    or

    @Html.StripHtml("<p>my <strong>html</strong> string</p>");
    

    strip some tags

    @Html.StripHtml("<p>my <strong>html</strong> string</p>", "p" );
    

    or

     string tags[] = { "p" };
    @Html.StripHtml("<p>my <strong>html</strong> string</p>",  tags);
    
  • k 255 posts 652 karma points
    Oct 24, 2019 @ 06:51
    k
    0

    Thanks kevin

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies