Copied to clipboard

Flag this post as spam?

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


  • k 256 posts 654 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 2342 posts 14889 karma points MVP 8x c-trib
    Oct 23, 2019 @ 12:04
    Kevin Jump
    2

    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 256 posts 654 karma points
    Oct 24, 2019 @ 06:51
    k
    0

    Thanks kevin

Please Sign in or register to post replies

Write your reply to:

Draft